diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-06-14 13:18:56 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-06-14 13:18:56 -0500 |
commit | a6ec5121f0c844786c84c568a3200562ec58a9c2 (patch) | |
tree | d29b9be6fd5ba51fbfc5e4a5cff52aad982d4c1e /spec/requests/git_http_spec.rb | |
parent | 69ad827e829175bebb985c8afe76174f42fc60bc (diff) | |
download | gitlab-ce-a6ec5121f0c844786c84c568a3200562ec58a9c2.tar.gz |
Correct RSpec/SingleLineHook cop offenses
Diffstat (limited to 'spec/requests/git_http_spec.rb')
-rw-r--r-- | spec/requests/git_http_spec.rb | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb index 6a83024d0d5..dce78faefc9 100644 --- a/spec/requests/git_http_spec.rb +++ b/spec/requests/git_http_spec.rb @@ -627,7 +627,9 @@ describe 'Git HTTP requests', lib: true do let(:path) { "/#{project.path_with_namespace}/info/refs" } context "when no params are added" do - before { get path } + before do + get path + end it "redirects to the .git suffix version" do expect(response).to redirect_to("/#{project.path_with_namespace}.git/info/refs") @@ -636,7 +638,10 @@ describe 'Git HTTP requests', lib: true do context "when the upload-pack service is requested" do let(:params) { { service: 'git-upload-pack' } } - before { get path, params } + + before do + get path, params + end it "redirects to the .git suffix version" do expect(response).to redirect_to("/#{project.path_with_namespace}.git/info/refs?service=#{params[:service]}") @@ -645,7 +650,10 @@ describe 'Git HTTP requests', lib: true do context "when the receive-pack service is requested" do let(:params) { { service: 'git-receive-pack' } } - before { get path, params } + + before do + get path, params + end it "redirects to the .git suffix version" do expect(response).to redirect_to("/#{project.path_with_namespace}.git/info/refs?service=#{params[:service]}") @@ -654,7 +662,10 @@ describe 'Git HTTP requests', lib: true do context "when the params are anything else" do let(:params) { { service: 'git-implode-pack' } } - before { get path, params } + + before do + get path, params + end it "redirects to the sign-in page" do expect(response).to redirect_to(new_user_session_path) @@ -695,7 +706,9 @@ describe 'Git HTTP requests', lib: true do end context "when the file does not exist" do - before { get "/#{project.path_with_namespace}/blob/master/info/refs" } + before do + get "/#{project.path_with_namespace}/blob/master/info/refs" + end it "returns not found" do expect(response).to have_http_status(:not_found) |