mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Decouple tests from unspecified data ordering
These tests have been passing with SQLite, but don't reflect guaranteed behavior and with PostgreSQL failed intermittently.
This commit is contained in:
parent
e709d080b4
commit
10f0edac20
3 changed files with 3 additions and 9 deletions
|
|
@ -17,9 +17,7 @@ describe Api::V1::RoomsController do
|
|||
|
||||
expect(response).to be_success
|
||||
|
||||
expect(json.length).to eq(2)
|
||||
expect(json[0]['name']).to eq('Conference Room')
|
||||
expect(json[1]['name']).to eq('Test Room')
|
||||
expect(json.map { |r| r['name'] }).to contain_exactly('Conference Room', 'Test Room')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +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.length).to eq(2)
|
||||
expect(json[0]['name']).to eq('Speaker')
|
||||
expect(json[1]['name']).to eq('Conf_Speaker')
|
||||
expect(json.map { |u| u['name'] }).to contain_exactly('Conf_Speaker', 'Speaker')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ describe Api::V1::TracksController do
|
|||
|
||||
expect(response).to be_success
|
||||
|
||||
expect(json.length).to eq(2)
|
||||
expect(json[0]['name']).to eq('Conference Track')
|
||||
expect(json[1]['name']).to eq('Test Track')
|
||||
expect(json.map { |t| t['name'] }).to contain_exactly('Conference Track', 'Test Track')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue