Fix rubocop offenses
This commit is contained in:
parent
718b1dddfe
commit
eefc46e0d5
2 changed files with 10 additions and 9 deletions
|
@ -20,10 +20,7 @@ describe Admin::SpamLogsController do
|
|||
|
||||
describe '#destroy' do
|
||||
it 'removes only the spam log when removing log' do
|
||||
expect {
|
||||
delete :destroy, id: first_spam.id
|
||||
}.to change { SpamLog.count }.by(-1)
|
||||
|
||||
expect { delete :destroy, id: first_spam.id }.to change { SpamLog.count }.by(-1)
|
||||
expect(User.find(user.id)).to be_truthy
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
|
|
@ -249,12 +249,16 @@ describe API::API, api: true do
|
|||
end
|
||||
end
|
||||
|
||||
it "should not create a new project issue" do
|
||||
expect {
|
||||
post api("/projects/#{project.id}/issues", user),
|
||||
title: 'new issue', description: 'content here', labels: 'label, label2'
|
||||
}.not_to change(Issue, :count)
|
||||
let(:params) do
|
||||
{
|
||||
title: 'new issue',
|
||||
description: 'content here',
|
||||
labels: 'label, label2'
|
||||
}
|
||||
end
|
||||
|
||||
it "should not create a new project issue" do
|
||||
expect { post api("/projects/#{project.id}/issues", user), params }.not_to change(Issue, :count)
|
||||
expect(response.status).to eq(400)
|
||||
expect(json_response['message']).to eq({ "error" => "Spam detected" })
|
||||
|
||||
|
|
Loading…
Reference in a new issue