File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33use Coderflex \LaravelTicket \Models \Label ;
44use Coderflex \LaravelTicket \Models \Ticket ;
55
6- it ('can attach category to a ticket ' , function () {
6+ it ('can attach label to a ticket ' , function () {
77 $ label = Label::factory ()->create ();
88 $ ticket = Ticket::factory ()->create ();
99
1212 $ this ->assertEquals ($ label ->tickets ->count (), 1 );
1313});
1414
15- it ('can deattach category to a ticket ' , function () {
15+ it ('can deattach label to a ticket ' , function () {
1616 $ label = Label::factory ()->create ();
1717 $ ticket = Ticket::factory ()->create ();
1818
2323 $ this ->assertEquals ($ label ->tickets ->count (), 0 );
2424});
2525
26- it ('gets categories by visibility status ' , function () {
26+ it ('gets labels by visibility status ' , function () {
2727 Label::factory ()->times (7 )->create ([
2828 'is_visible ' => true ,
2929 ]);
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Coderflex \LaravelTicket \Models \Message ;
4+ use Coderflex \LaravelTicket \Models \Ticket ;
5+
6+ it ('can attach message to a ticket ' , function () {
7+ $ message = Message::factory ()->create ();
8+ $ ticket = Ticket::factory ()->create ([
9+ 'title ' => 'Can you create a message? ' ,
10+ ]);
11+
12+ $ message ->ticket ()->associate ($ ticket );
13+
14+ $ this ->assertEquals ($ message ->ticket ->title , 'Can you create a message? ' );
15+ });
You can’t perform that action at this time.
0 commit comments