summaryrefslogtreecommitdiff
path: root/spec/services/note_summary_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/note_summary_spec.rb')
-rw-r--r--spec/services/note_summary_spec.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/services/note_summary_spec.rb b/spec/services/note_summary_spec.rb
index a6cc2251e48..7d48759c3cc 100644
--- a/spec/services/note_summary_spec.rb
+++ b/spec/services/note_summary_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require "spec_helper"
describe NoteSummary do
let(:project) { build(:project) }
@@ -6,39 +6,39 @@ describe NoteSummary do
let(:user) { build(:user) }
def create_note_summary
- described_class.new(noteable, project, user, 'note', action: 'icon', commit_count: 5)
+ described_class.new(noteable, project, user, "note", action: "icon", commit_count: 5)
end
- describe '#metadata?' do
- it 'returns true when metadata present' do
+ describe "#metadata?" do
+ it "returns true when metadata present" do
expect(create_note_summary.metadata?).to be_truthy
end
- it 'returns false when metadata not present' do
- expect(described_class.new(noteable, project, user, 'note').metadata?).to be_falsey
+ it "returns false when metadata not present" do
+ expect(described_class.new(noteable, project, user, "note").metadata?).to be_falsey
end
end
- describe '#note' do
- it 'returns note hash' do
- expect(create_note_summary.note).to eq(noteable: noteable, project: project, author: user, note: 'note')
+ describe "#note" do
+ it "returns note hash" do
+ expect(create_note_summary.note).to eq(noteable: noteable, project: project, author: user, note: "note")
end
- context 'when noteable is a commit' do
+ context "when noteable is a commit" do
let(:noteable) { build(:commit) }
- it 'returns note hash specific to commit' do
+ it "returns note hash specific to commit" do
expect(create_note_summary.note).to eq(
- noteable: nil, project: project, author: user, note: 'note',
- noteable_type: 'Commit', commit_id: noteable.id
+ noteable: nil, project: project, author: user, note: "note",
+ noteable_type: "Commit", commit_id: noteable.id
)
end
end
end
- describe '#metadata' do
- it 'returns metadata hash' do
- expect(create_note_summary.metadata).to eq(action: 'icon', commit_count: 5)
+ describe "#metadata" do
+ it "returns metadata hash" do
+ expect(create_note_summary.metadata).to eq(action: "icon", commit_count: 5)
end
end
end