BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
spam_logs_controller_spec.rb
spec/controllers/admin/spam_logs_controller_spec.rb
+1
-4
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
...
@@ -20,10 +20,7 @@ describe Admin::SpamLogsController do
describe
'#destroy'
do
describe
'#destroy'
do
it
'removes only the spam log when removing log'
do
it
'removes only the spam log when removing log'
do
expect
{
expect
{
delete
:destroy
,
id:
first_spam
.
id
}.
to
change
{
SpamLog
.
count
}.
by
(
-
1
)
delete
:destroy
,
id:
first_spam
.
id
}.
to
change
{
SpamLog
.
count
}.
by
(
-
1
)
expect
(
User
.
find
(
user
.
id
)).
to
be_truthy
expect
(
User
.
find
(
user
.
id
)).
to
be_truthy
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
response
.
status
).
to
eq
(
200
)
end
end
...
...
spec/requests/api/issues_spec.rb
View file @
eefc46e0
...
@@ -249,12 +249,16 @@ describe API::API, api: true do
...
@@ -249,12 +249,16 @@ describe API::API, api: true do
end
end
end
end
it
"should not create a new project issue"
do
let
(
:params
)
do
expect
{
{
post
api
(
"/projects/
#{
project
.
id
}
/issues"
,
user
),
title:
'new issue'
,
title:
'new issue'
,
description:
'content here'
,
labels:
'label, label2'
description:
'content here'
,
}.
not_to
change
(
Issue
,
:count
)
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
(
response
.
status
).
to
eq
(
400
)
expect
(
json_response
[
'message'
]).
to
eq
({
"error"
=>
"Spam detected"
})
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