mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Minor refactor
This commit is contained in:
parent
10f0edac20
commit
a179a38fae
5 changed files with 5 additions and 5 deletions
|
|
@ -21,7 +21,7 @@ describe Api::V1::ConferencesController do
|
|||
end
|
||||
|
||||
it 'returns correct conferences' do
|
||||
expect(@json.map { |c| c['short_title'] }).to contain_exactly('conf_one', 'conf_two')
|
||||
expect(@json.pluck('short_title')).to contain_exactly('conf_one', 'conf_two')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe Api::V1::EventsController do
|
|||
json = JSON.parse(response.body)['events']
|
||||
expect(response).to be_success
|
||||
|
||||
expect(json.map { |e| e['title'] }).to contain_exactly('Conference Event', 'Example Event')
|
||||
expect(json.pluck('title')).to contain_exactly('Conference Event', 'Example Event')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ describe Api::V1::RoomsController do
|
|||
|
||||
expect(response).to be_success
|
||||
|
||||
expect(json.map { |r| r['name'] }).to contain_exactly('Conference Room', 'Test Room')
|
||||
expect(json.pluck('name')).to contain_exactly('Conference Room', 'Test Room')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ describe Api::V1::SpeakersController do
|
|||
get :index, params: { format: :json }
|
||||
json = JSON.parse(response.body)['speakers']
|
||||
expect(response).to be_success
|
||||
expect(json.map { |u| u['name'] }).to contain_exactly('Conf_Speaker', 'Speaker')
|
||||
expect(json.pluck('name')).to contain_exactly('Conf_Speaker', 'Speaker')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ describe Api::V1::TracksController do
|
|||
|
||||
expect(response).to be_success
|
||||
|
||||
expect(json.map { |t| t['name'] }).to contain_exactly('Conference Track', 'Test Track')
|
||||
expect(json.pluck('name')).to contain_exactly('Conference Track', 'Test Track')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue