Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-20 22:17:37 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-09-20 22:17:37 +0300
commit918e589c2b29c18d9fe3a8e6c93a3f490c86beb1 (patch)
tree4b354c178952b4369beb16af43c6b75f9d882c49 /spec/services/merge_requests/create_service_spec.rb
parenta4a0ce95001b93c2ed65a18946542f3eecdf564e (diff)
Implement a second round of review comments from @DouweM.
- Don't use `TableReferences` - using `.arel_table` is shorter! - Move some database-related code to `Gitlab::Database` - Remove the `MergeRequest#issues_closed` and `Issue#closed_by_merge_requests` associations. They were either shadowing or were too similar to existing methods. They are not being used anywhere, so it's better to remove them to reduce confusion. - Use Rails 3-style validations - Index for `MergeRequest::Metrics#first_deployed_to_production_at` - Only include `CycleAnalyticsHelpers::TestGeneration` for specs that need it. - Other minor refactorings.
Diffstat (limited to 'spec/services/merge_requests/create_service_spec.rb')
-rw-r--r--spec/services/merge_requests/create_service_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/services/merge_requests/create_service_spec.rb b/spec/services/merge_requests/create_service_spec.rb
index a0614abcf62..ff6bad6aaba 100644
--- a/spec/services/merge_requests/create_service_spec.rb
+++ b/spec/services/merge_requests/create_service_spec.rb
@@ -108,7 +108,7 @@ describe MergeRequests::CreateService, services: true do
allow(service).to receive(:execute_hooks)
merge_request = service.execute
- expect(merge_request.issues_closed).to match_array([first_issue, second_issue])
+ expect(merge_request.reload.closes_issues).to match_array([first_issue, second_issue])
end
end
end