diff options
Diffstat (limited to 'spec/models/ci/runner_spec.rb')
-rw-r--r-- | spec/models/ci/runner_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb index eb2daed7f32..ffd2a2b9602 100644 --- a/spec/models/ci/runner_spec.rb +++ b/spec/models/ci/runner_spec.rb @@ -71,9 +71,8 @@ describe Ci::Runner do end it 'should fail to save a group assigned to a project runner even if the runner is already saved' do - group_runner - - expect { create(:group, runners: [project_runner]) } + group.runners << project_runner + expect { group.save! } .to raise_error(ActiveRecord::RecordInvalid) end end |