diff options
Diffstat (limited to 'spec/controllers/uploads_controller_spec.rb')
-rw-r--r-- | spec/controllers/uploads_controller_spec.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index b29f3d861be..7e42e43345c 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -18,7 +18,7 @@ describe UploadsController do it "returns 401 when the user is not logged in" do post :create, model: model, id: snippet.id, format: :json - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) end it "returns 404 when user can't comment on a snippet" do @@ -27,7 +27,7 @@ describe UploadsController do sign_in(user) post :create, model: model, id: private_snippet.id, format: :json - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end @@ -39,7 +39,7 @@ describe UploadsController do it "returns an error without file" do post :create, model: model, id: snippet.id, format: :json - expect(response).to have_http_status(422) + expect(response).to have_gitlab_http_status(422) end it "returns an error with invalid model" do @@ -50,7 +50,7 @@ describe UploadsController do it "returns 404 status when object not found" do post :create, model: model, id: 9999, format: :json - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end context 'with valid image' do @@ -174,7 +174,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "user", mounted_as: "avatar", id: user.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -190,7 +190,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "user", mounted_as: "avatar", id: user.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -214,7 +214,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -233,7 +233,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -285,7 +285,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -301,7 +301,7 @@ describe UploadsController do it "responds with status 404" do get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "image.png" - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end end @@ -316,7 +316,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -335,7 +335,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -378,7 +378,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -394,7 +394,7 @@ describe UploadsController do it "responds with status 404" do get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "image.png" - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end end @@ -414,7 +414,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -433,7 +433,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -485,7 +485,7 @@ describe UploadsController do it "responds with status 200" do get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "image.png" - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -501,7 +501,7 @@ describe UploadsController do it "responds with status 404" do get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "image.png" - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end end @@ -516,7 +516,7 @@ describe UploadsController do it 'responds with status 200' do get :show, model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png' - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do @@ -535,7 +535,7 @@ describe UploadsController do it 'responds with status 200' do get :show, model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png' - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it_behaves_like 'content not cached without revalidation' do |