fix the build (take 2).
This commit is contained in:
parent
7aea7f2cae
commit
1820347d58
|
@ -21,13 +21,13 @@ describe ExportCsvController do
|
||||||
it "should not enqueue export job if rate limit is reached" 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)
|
UserExport.create(file_name: "user-archive-codinghorror-150116-003249", user_id: user.id)
|
||||||
post "/export_csv/export_entity.json", params: { entity: "user_archive" }
|
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)
|
expect(Jobs::ExportCsvFile.jobs.size).to eq(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns 404 when normal user tries to export admin entity" do
|
it "returns 404 when normal user tries to export admin entity" do
|
||||||
post "/export_csv/export_entity.json", params: { entity: "staff_action" }
|
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)
|
expect(Jobs::ExportCsvFile.jobs.size).to eq(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ describe ExportCsvController do
|
||||||
describe '#export_entity' do
|
describe '#export_entity' do
|
||||||
it 'does not allow moderators to export user_list' do
|
it 'does not allow moderators to export user_list' do
|
||||||
post '/export_csv/export_entity.json', params: { entity: 'user_list' }
|
post '/export_csv/export_entity.json', params: { entity: 'user_list' }
|
||||||
expect(response.status).to eq(403)
|
expect(response.status).to eq(422)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'allows moderator to export other entities' do
|
it 'allows moderator to export other entities' do
|
||||||
|
|
Loading…
Reference in New Issue