DEV: correct test that assumed group 123 did not exist

This is an incorrect assumption leading to a flaky test, cause for all we
know, since sequences do not reset every test, group 123 could exist.
This commit is contained in:
Sam Saffron 2019-05-21 12:57:14 +10:00
parent f4d4f7871e
commit 307c526840
1 changed files with 2 additions and 2 deletions

View File

@ -106,8 +106,8 @@ RSpec.describe Admin::GroupsController do
context "#destroy" do context "#destroy" do
it 'should return the right response for an invalid group_id' do it 'should return the right response for an invalid group_id' do
delete "/admin/groups/123.json" max_id = Group.maximum(:id).to_i
delete "/admin/groups/#{max_id + 1}.json"
expect(response.status).to eq(404) expect(response.status).to eq(404)
end end