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
Jérome Perrin
gitlab-ce
Commits
c18f96cf
Commit
c18f96cf
authored
Nov 23, 2016
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move admin spam spinach test to Rspec
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
parent
3e0c6142
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
36 deletions
+26
-36
changelogs/unreleased/move-admin-spam-spinach-test-to-rspec.yml
...logs/unreleased/move-admin-spam-spinach-test-to-rspec.yml
+4
-0
features/admin/spam_logs.feature
features/admin/spam_logs.feature
+0
-8
features/steps/admin/spam_logs.rb
features/steps/admin/spam_logs.rb
+0
-28
spec/features/admin/admin_browse_spam_logs_spec.rb
spec/features/admin/admin_browse_spam_logs_spec.rb
+22
-0
No files found.
changelogs/unreleased/move-admin-spam-spinach-test-to-rspec.yml
0 → 100644
View file @
c18f96cf
---
title
:
Move admin spam spinach test to Rspec
merge_request
:
7708
author
:
Semyon Pupkov
features/admin/spam_logs.feature
deleted
100644 → 0
View file @
3e0c6142
Feature
:
Admin spam logs
Background
:
Given
I sign in as an admin
And
spam logs exist
Scenario
:
Browse spam logs
When
I visit spam logs page
Then
I should see list of spam logs
features/steps/admin/spam_logs.rb
deleted
100644 → 0
View file @
3e0c6142
class
Spinach::Features::AdminSpamLogs
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedAdmin
step
'I should see list of spam logs'
do
expect
(
page
).
to
have_content
(
'Spam Logs'
)
expect
(
page
).
to
have_content
spam_log
.
source_ip
expect
(
page
).
to
have_content
spam_log
.
noteable_type
expect
(
page
).
to
have_content
'N'
expect
(
page
).
to
have_content
spam_log
.
title
expect
(
page
).
to
have_content
truncate
(
spam_log
.
description
)
expect
(
page
).
to
have_link
(
'Remove user'
)
expect
(
page
).
to
have_link
(
'Block user'
)
end
step
'spam logs exist'
do
create
(
:spam_log
)
end
def
spam_log
@spam_log
||=
SpamLog
.
first
end
def
truncate
(
description
)
"
#{
spam_log
.
description
[
0
...
97
]
}
..."
end
end
spec/features/admin/admin_browse_spam_logs_spec.rb
0 → 100644
View file @
c18f96cf
require
'spec_helper'
describe
'Admin browse spam logs'
do
let!
(
:spam_log
)
{
create
(
:spam_log
)
}
before
do
login_as
:admin
end
scenario
'Browse spam logs'
do
visit
admin_spam_logs_path
expect
(
page
).
to
have_content
(
'Spam Logs'
)
expect
(
page
).
to
have_content
(
spam_log
.
source_ip
)
expect
(
page
).
to
have_content
(
spam_log
.
noteable_type
)
expect
(
page
).
to
have_content
(
'N'
)
expect
(
page
).
to
have_content
(
spam_log
.
title
)
expect
(
page
).
to
have_content
(
"
#{
spam_log
.
description
[
0
...
97
]
}
..."
)
expect
(
page
).
to
have_link
(
'Remove user'
)
expect
(
page
).
to
have_link
(
'Block user'
)
end
end
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