mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Use dynamic fake data in the spec
This commit is contained in:
parent
4d38305110
commit
73ce49de25
14 changed files with 36 additions and 36 deletions
|
|
@ -12,7 +12,7 @@ describe ConferenceSerializer, type: :serializer do
|
|||
{
|
||||
conference: {
|
||||
short_title: 'goto',
|
||||
title: 'The dog and pony show',
|
||||
title: conference.title,
|
||||
description: 'Lorem ipsum dolor sit',
|
||||
start_date: '2014-03-04',
|
||||
end_date: '2014-03-10',
|
||||
|
|
@ -61,7 +61,7 @@ describe ConferenceSerializer, type: :serializer do
|
|||
before do
|
||||
venue = create(:venue, conference: conference)
|
||||
_room = create(:room, venue: venue)
|
||||
_track = create(:track, program: conference.program)
|
||||
track = create(:track, program: conference.program)
|
||||
|
||||
room_hash = {
|
||||
rooms: [{
|
||||
|
|
@ -74,8 +74,8 @@ describe ConferenceSerializer, type: :serializer do
|
|||
track_hash = {
|
||||
tracks: [{
|
||||
id: 1,
|
||||
name: 'Example Track',
|
||||
description: 'Lorem Ipsum dolsum'
|
||||
name: track.name,
|
||||
description: track.description
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ describe RoomSerializer, type: :serializer do
|
|||
expected_json = {
|
||||
room: {
|
||||
guid: room.guid,
|
||||
name: 'Example Room',
|
||||
name: room.name,
|
||||
description: ''
|
||||
}
|
||||
}.to_json
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ describe TrackSerializer, type: :serializer do
|
|||
expected_json = {
|
||||
track: {
|
||||
guid: track.guid,
|
||||
name: 'Example Track',
|
||||
color: '#ffffff'
|
||||
name: track.name,
|
||||
color: track.color
|
||||
}
|
||||
}.to_json
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue