diff options
author | Sean McGivern <sean@gitlab.com> | 2017-04-25 15:28:55 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-04-26 14:50:32 +0300 |
commit | 5069682d8ed892705ec1a933554cc4060e5691af (patch) | |
tree | e2f286cf4ebd2678acf845d066146854885126ab /spec/services/issues | |
parent | 6dc424c949ab3de9395d821b05d2e1cc5f632ed2 (diff) |
Enable RSpec/FilePath cop
- Ignore JS fixtures
- Ignore qa directory
- Rewrite concern specs to put concern name first
Diffstat (limited to 'spec/services/issues')
-rw-r--r-- | spec/services/issues/resolve_discussions_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/services/issues/resolve_discussions_spec.rb b/spec/services/issues/resolve_discussions_spec.rb index 4a4929daefc..c3b4c2176ee 100644 --- a/spec/services/issues/resolve_discussions_spec.rb +++ b/spec/services/issues/resolve_discussions_spec.rb @@ -1,15 +1,15 @@ require 'spec_helper.rb' -class DummyService < Issues::BaseService - include ::Issues::ResolveDiscussions +describe Issues::ResolveDiscussions, services: true do + class DummyService < Issues::BaseService + include ::Issues::ResolveDiscussions - def initialize(*args) - super - filter_resolve_discussion_params + def initialize(*args) + super + filter_resolve_discussion_params + end end -end -describe DummyService, services: true do let(:project) { create(:project, :repository) } let(:user) { create(:user) } @@ -23,7 +23,7 @@ describe DummyService, services: true do let(:other_merge_request) { create(:merge_request, source_project: project, source_branch: "other") } describe "#merge_request_for_resolving_discussion" do - let(:service) { described_class.new(project, user, merge_request_to_resolve_discussions_of: merge_request.iid) } + let(:service) { DummyService.new(project, user, merge_request_to_resolve_discussions_of: merge_request.iid) } it "finds the merge request" do expect(service.merge_request_to_resolve_discussions_of).to eq(merge_request) @@ -43,7 +43,7 @@ describe DummyService, services: true do describe "#discussions_to_resolve" do it "contains a single discussion when matching merge request and discussion are passed" do - service = described_class.new( + service = DummyService.new( project, user, discussion_to_resolve: discussion.id, @@ -61,7 +61,7 @@ describe DummyService, services: true do noteable: merge_request, project: merge_request.target_project, line_number: 15)]) - service = described_class.new( + service = DummyService.new( project, user, merge_request_to_resolve_discussions_of: merge_request.iid @@ -79,7 +79,7 @@ describe DummyService, services: true do project: merge_request.target_project, line_number: 15, )]) - service = described_class.new( + service = DummyService.new( project, user, merge_request_to_resolve_discussions_of: merge_request.iid @@ -92,7 +92,7 @@ describe DummyService, services: true do end it "is empty when a discussion and another merge request are passed" do - service = described_class.new( + service = DummyService.new( project, user, discussion_to_resolve: discussion.id, |