Fix model specs to work with MySQL

This commit is contained in:
Hernan Schmidt 2016-08-17 18:49:00 +02:00 committed by Hernán Schmidt
parent baa5894c38
commit a6d4d51b03
3 changed files with 5 additions and 5 deletions

View file

@ -29,13 +29,13 @@ describe SponsorshipLevel do
it 'is positions sponsorship_levels in order' do
expect(SponsorshipLevel.where(conference_id: conference.id).order(:position).map(&:id))
.to eq [2, 1, 3]
.to eq [@second_sponsorship_level.id, @first_sponsorship_level.id, @third_sponsorship_level.id]
end
it 'maintains order after deleting one element' do
@first_sponsorship_level.destroy
expect(SponsorshipLevel.where(conference_id: conference.id).order(:position).map(&:id))
.to eq [2, 3]
.to eq [@second_sponsorship_level.id, @third_sponsorship_level.id]
end
end
end