diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-07-09 03:41:22 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-07-10 21:04:56 +0300 |
commit | 72dee32f460b8f1217e1e92cd4833b2b91b287e0 (patch) | |
tree | 415576ad6a02ae7cef07aaf7cb34a6f0a9313e03 /spec/services | |
parent | 2d9cd76f4f7319a9f4cafc5a01e6b5f29d3cb1fc (diff) |
Upgrade rspec-rails to 3.8.2 and dependencies
This brings the rspec-core version in line with the Gitaly changes
and introduces Rails 5.1/5.2 improvements.
Full CHANGELOG:
https://github.com/rspec/rspec-rails/blob/master/Changelog.md
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/issuable/bulk_update_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/merge_requests/mergeability_check_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/spec/services/issuable/bulk_update_service_spec.rb b/spec/services/issuable/bulk_update_service_spec.rb index 3d2d4b5f216..b0bcd7a36ba 100644 --- a/spec/services/issuable/bulk_update_service_spec.rb +++ b/spec/services/issuable/bulk_update_service_spec.rb @@ -165,7 +165,7 @@ describe Issuable::BulkUpdateService do context 'when the new assignee ID is not present' do it 'does not unassign' do expect { bulk_update(issue, assignee_ids: []) } - .not_to change { issue.reload.assignees } + .not_to change(issue.assignees, :count) end end end diff --git a/spec/services/merge_requests/mergeability_check_service_spec.rb b/spec/services/merge_requests/mergeability_check_service_spec.rb index 6efece64092..6e827f2ea5b 100644 --- a/spec/services/merge_requests/mergeability_check_service_spec.rb +++ b/spec/services/merge_requests/mergeability_check_service_spec.rb @@ -11,7 +11,11 @@ describe MergeRequests::MergeabilityCheckService do end it 'does not change the merge ref HEAD' do - expect { subject }.not_to change(merge_request, :merge_ref_head) + merge_ref_head = merge_request.merge_ref_head + + subject + + expect(merge_request.reload.merge_ref_head).to eq merge_ref_head end it 'returns ServiceResponse.error' do @@ -73,7 +77,7 @@ describe MergeRequests::MergeabilityCheckService do it 'second call does not change the merge-ref' do expect { subject }.to change(merge_request, :merge_ref_head).from(nil) - expect { subject }.not_to change(merge_request, :merge_ref_head) + expect { subject }.not_to change(merge_request.merge_ref_head, :id) end end diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index f566d235787..7e5837a4798 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -598,7 +598,7 @@ describe MergeRequests::UpdateService, :mailer do feature_visibility_attr = :"#{merge_request.model_name.plural}_access_level" project.project_feature.update_attribute(feature_visibility_attr, ProjectFeature::PRIVATE) - expect { update_merge_request(assignee_ids: [assignee]) }.not_to change { merge_request.reload.assignees } + expect { update_merge_request(assignee_ids: [assignee]) }.not_to change(merge_request.assignees, :count) end end end |