mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Integrate the schedule in the admin interface
Integrate the schedule in the admin interface while adapting it to the new associations and models.
This commit is contained in:
parent
e7a30302ff
commit
dfd64a4510
32 changed files with 291 additions and 10074 deletions
|
|
@ -260,22 +260,22 @@ describe Event do
|
|||
end
|
||||
|
||||
describe '#as_json' do
|
||||
it 'adds the event\'s room_guid, track_color and length' do
|
||||
it 'adds the event\'s track_color, track_text_color and length' do
|
||||
create(:event_schedule, event: event)
|
||||
event.track = create(:track, color: '#efefef')
|
||||
json_hash = event.as_json(nil)
|
||||
json_hash = event.as_json
|
||||
|
||||
expect(json_hash[:room_guid]).to eq(event.scheduled_room.guid)
|
||||
expect(json_hash[:track_color]).to eq('#EFEFEF')
|
||||
expect(json_hash[:track_text_color]).to eq('black')
|
||||
expect(json_hash[:length]).to eq(30)
|
||||
end
|
||||
|
||||
it 'uses correct default values for room_guid, track_color and length' do
|
||||
it 'uses correct default values for track_color, track_text_color and length' do
|
||||
event.event_type = nil
|
||||
json_hash = event.as_json(nil)
|
||||
json_hash = event.as_json
|
||||
|
||||
expect(json_hash[:room_guid]).to be_nil
|
||||
expect(json_hash[:track_color]).to eq('#FFFFFF')
|
||||
expect(json_hash[:track_text_color]).to eq('black')
|
||||
expect(json_hash[:length]).to eq(15)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue