summaryrefslogtreecommitdiff
path: root/spec/models/concerns/noteable_spec.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /spec/models/concerns/noteable_spec.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'spec/models/concerns/noteable_spec.rb')
-rw-r--r--spec/models/concerns/noteable_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/concerns/noteable_spec.rb b/spec/models/concerns/noteable_spec.rb
index 485a6e165a1..760b6c50679 100644
--- a/spec/models/concerns/noteable_spec.rb
+++ b/spec/models/concerns/noteable_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe Noteable do
let!(:active_diff_note1) { create(:diff_note_on_merge_request) }
@@ -40,10 +40,10 @@ describe Noteable do
)
end
- describe '#discussions' do
+ describe "#discussions" do
let(:discussions) { subject.discussions }
- it 'includes discussions for diff notes, commit diff notes, commit notes, and regular notes' do
+ it "includes discussions for diff notes, commit diff notes, commit notes, and regular notes" do
expect(discussions).to eq([
DiffDiscussion.new([active_diff_note1, active_diff_note2], subject),
DiffDiscussion.new([active_diff_note3], subject),
@@ -54,12 +54,12 @@ describe Noteable do
Discussion.new([commit_discussion_note1, commit_discussion_note2], subject),
Discussion.new([commit_discussion_note3], subject),
IndividualNoteDiscussion.new([note1], subject),
- IndividualNoteDiscussion.new([note2], subject)
+ IndividualNoteDiscussion.new([note2], subject),
])
end
end
- describe '#grouped_diff_discussions' do
+ describe "#grouped_diff_discussions" do
let(:grouped_diff_discussions) { subject.grouped_diff_discussions }
it "includes active discussions" do
@@ -225,34 +225,34 @@ describe Noteable do
allow(third_discussion).to receive(:to_be_resolved?).and_return(false)
end
- it 'includes only discussions that need to be resolved' do
+ it "includes only discussions that need to be resolved" do
expect(subject.discussions_to_be_resolved).to eq([first_discussion])
end
end
- describe '#discussions_can_be_resolved_by?' do
+ describe "#discussions_can_be_resolved_by?" do
let(:user) { build(:user) }
- context 'all discussions can be resolved by the user' do
+ context "all discussions can be resolved by the user" do
before do
allow(first_discussion).to receive(:can_resolve?).with(user).and_return(true)
allow(second_discussion).to receive(:can_resolve?).with(user).and_return(true)
allow(third_discussion).to receive(:can_resolve?).with(user).and_return(true)
end
- it 'allows a user to resolve the discussions' do
+ it "allows a user to resolve the discussions" do
expect(subject.discussions_can_be_resolved_by?(user)).to be(true)
end
end
- context 'one discussion cannot be resolved by the user' do
+ context "one discussion cannot be resolved by the user" do
before do
allow(first_discussion).to receive(:can_resolve?).with(user).and_return(true)
allow(second_discussion).to receive(:can_resolve?).with(user).and_return(true)
allow(third_discussion).to receive(:can_resolve?).with(user).and_return(false)
end
- it 'allows a user to resolve the discussions' do
+ it "allows a user to resolve the discussions" do
expect(subject.discussions_can_be_resolved_by?(user)).to be(false)
end
end