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
e6f3aa559e
commit
a7006a4edd
5 changed files with 26 additions and 27 deletions
|
|
@ -15,9 +15,7 @@ describe Api::V1::EventsController do
|
|||
json = JSON.parse(response.body)['events']
|
||||
expect(response).to be_success
|
||||
|
||||
expect(json.length).to eq(2)
|
||||
expect(json[0]['title']).to eq('Example Event')
|
||||
expect(json[1]['title']).to eq('Conference Event')
|
||||
expect(json.map { |e| e['title'] }).to contain_exactly('Conference Event', 'Example Event')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue