summaryrefslogtreecommitdiff
path: root/spec/requests/api/commits_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-06-14 13:18:56 -0500
committerRobert Speicher <rspeicher@gmail.com>2017-06-14 13:18:56 -0500
commita6ec5121f0c844786c84c568a3200562ec58a9c2 (patch)
treed29b9be6fd5ba51fbfc5e4a5cff52aad982d4c1e /spec/requests/api/commits_spec.rb
parent69ad827e829175bebb985c8afe76174f42fc60bc (diff)
downloadgitlab-ce-a6ec5121f0c844786c84c568a3200562ec58a9c2.tar.gz
Correct RSpec/SingleLineHook cop offenses
Diffstat (limited to 'spec/requests/api/commits_spec.rb')
-rw-r--r--spec/requests/api/commits_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index b0c265b6453..0dad547735d 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -9,11 +9,15 @@ describe API::Commits do
let!(:note) { create(:note_on_commit, author: user, project: project, commit_id: project.repository.commit.id, note: 'a comment on a commit') }
let!(:another_note) { create(:note_on_commit, author: user, project: project, commit_id: project.repository.commit.id, note: 'another comment on a commit') }
- before { project.team << [user, :reporter] }
+ before do
+ project.team << [user, :reporter]
+ end
describe "List repository commits" do
context "authorized user" do
- before { project.team << [user2, :reporter] }
+ before do
+ project.team << [user2, :reporter]
+ end
it "returns project commits" do
commit = project.repository.commit
@@ -514,7 +518,9 @@ describe API::Commits do
describe "Get the diff of a commit" do
context "authorized user" do
- before { project.team << [user2, :reporter] }
+ before do
+ project.team << [user2, :reporter]
+ end
it "returns the diff of the selected commit" do
get api("/projects/#{project.id}/repository/commits/#{project.repository.commit.id}/diff", user)