Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
eefc46e0
Commit
eefc46e0
authored
Jan 26, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop offenses
parent
718b1ddd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
spec/controllers/admin/spam_logs_controller_spec.rb
spec/controllers/admin/spam_logs_controller_spec.rb
+1
-4
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+9
-5
No files found.
spec/controllers/admin/spam_logs_controller_spec.rb
View file @
eefc46e0
...
...
@@ -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
...
...
spec/requests/api/issues_spec.rb
View file @
eefc46e0
...
...
@@ -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"
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment