@@ -15,7 +15,37 @@ class ViewConcertListingTest extends TestCase
15
15
/** @test */
16
16
function user_can_view_a_published_concert_listing ()
17
17
{
18
- gdgdgdggdgddgdhdhjdsdahdsahjdjashgdasdhjadhajdgdvcdasvhckjalcvasc.khasc
18
+ // Arrange
19
+ // Create a concert
20
+ $ concert = factory (Concert::class)->states ('published ' )->create ([
21
+ 'title ' => 'The Red Chord ' ,
22
+ 'subtitle ' => 'with Animosity and Lethargy ' ,
23
+ 'date ' => Carbon::parse ('December 13, 2016 8:00pm ' ),
24
+ 'ticket_price ' => 3250 ,
25
+ 'venue ' => 'The Mosh Pit ' ,
26
+ 'venue_address ' => '123 Example Lane ' ,
27
+ 'city ' => 'Laraville ' ,
28
+ 'state ' => 'ON ' ,
29
+ 'zip ' => '17916 ' ,
30
+ 'additional_information ' => 'For tickets, call (555) 555-5555. ' ,
31
+ ]);
32
+ // Act
33
+ // View the concert listing
34
+ $ response = $ this ->get ('/concerts/ ' .$ concert ->id );
35
+ // Assert outcome obtained
36
+ $ response ->assertStatus (200 );
37
+ // Verify we can see the concert detail
38
+ $ response ->assertSee ('The Red Chord ' );
39
+ $ response ->assertSee ('with Animosity and Lethargy ' );
40
+ $ response ->assertSee ('December 13, 2016 ' );
41
+ $ response ->assertSee ('8:00pm ' );
42
+ $ response ->assertSee ('32.50 ' );
43
+ $ response ->assertSee ('The Mosh Pit ' );
44
+ $ response ->assertSee ('123 Example Lane ' );
45
+ $ response ->assertSee ('Laraville ' );
46
+ $ response ->assertSee ('ON ' );
47
+ $ response ->assertSee ('17916 ' );
48
+ $ response ->assertSee ('For tickets, call (555) 555-5555. ' );
19
49
}
20
50
21
51
0 commit comments