From 1820347d58c75770a117fe298b4bcf5654d2dcc8 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Tue, 24 Dec 2019 19:27:25 +0530 Subject: [PATCH] fix the build (take 2). --- spec/requests/export_csv_controller_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/requests/export_csv_controller_spec.rb b/spec/requests/export_csv_controller_spec.rb index 0fbc55b37c5..5fc08d7e6b2 100644 --- a/spec/requests/export_csv_controller_spec.rb +++ b/spec/requests/export_csv_controller_spec.rb @@ -21,13 +21,13 @@ describe ExportCsvController do it "should not enqueue export job if rate limit is reached" do UserExport.create(file_name: "user-archive-codinghorror-150116-003249", user_id: user.id) post "/export_csv/export_entity.json", params: { entity: "user_archive" } - expect(response).to be_forbidden + expect(response.status).to eq(422) expect(Jobs::ExportCsvFile.jobs.size).to eq(0) end it "returns 404 when normal user tries to export admin entity" do post "/export_csv/export_entity.json", params: { entity: "staff_action" } - expect(response).to be_forbidden + expect(response.status).to eq(422) expect(Jobs::ExportCsvFile.jobs.size).to eq(0) end @@ -87,7 +87,7 @@ describe ExportCsvController do describe '#export_entity' do it 'does not allow moderators to export user_list' do post '/export_csv/export_entity.json', params: { entity: 'user_list' } - expect(response.status).to eq(403) + expect(response.status).to eq(422) end it 'allows moderator to export other entities' do