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
Tatuya Kamada
gitlab-ce
Commits
5636825f
Commit
5636825f
authored
Nov 22, 2016
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move abuse report spinach test to rspec
part of
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
parent
60c2d590
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
49 deletions
+28
-49
changelogs/unreleased/move-abuse-report-spinach-test-to-rspec.yml
...gs/unreleased/move-abuse-report-spinach-test-to-rspec.yml
+4
-0
features/abuse_report.feature
features/abuse_report.feature
+0
-17
features/steps/abuse_reports.rb
features/steps/abuse_reports.rb
+0
-32
spec/features/abuse_report_spec.rb
spec/features/abuse_report_spec.rb
+24
-0
No files found.
changelogs/unreleased/move-abuse-report-spinach-test-to-rspec.yml
0 → 100644
View file @
5636825f
---
title
:
Move abuse report spinach test to rspec
merge_request
:
7659
author
:
Semyon Pupkov
features/abuse_report.feature
deleted
100644 → 0
View file @
60c2d590
Feature
:
Abuse reports
Background
:
Given
I sign in as a user
And
user
"Mike"
exists
Scenario
:
Report abuse
Given
I visit
"Mike"
user page
And
I click
"Report abuse"
button
When
I fill and submit abuse form
Then
I should see success message
Scenario
:
Report abuse available only once
Given
I visit
"Mike"
user page
And
I click
"Report abuse"
button
When
I fill and submit abuse form
And
I visit
"Mike"
user page
Then
I should see a red
"Report abuse"
button
features/steps/abuse_reports.rb
deleted
100644 → 0
View file @
60c2d590
class
Spinach::Features::AbuseReports
<
Spinach
::
FeatureSteps
include
SharedAuthentication
step
'I visit "Mike" user page'
do
visit
user_path
(
user_mike
)
end
step
'I click "Report abuse" button'
do
click_link
'Report abuse'
end
step
'I fill and submit abuse form'
do
fill_in
'abuse_report_message'
,
with:
'This user send spam'
click_button
'Send report'
end
step
'I should see success message'
do
page
.
should
have_content
'Thank you for your report'
end
step
'user "Mike" exists'
do
user_mike
end
step
'I should see a red "Report abuse" button'
do
expect
(
page
).
to
have_button
(
"Already reported for abuse"
)
end
def
user_mike
@user_mike
||=
create
(
:user
,
name:
'Mike'
)
end
end
spec/features/abuse_report_spec.rb
0 → 100644
View file @
5636825f
require
'spec_helper'
feature
'Abuse reports'
,
feature:
true
do
let
(
:another_user
)
{
create
(
:user
)
}
before
do
login_as
:user
end
scenario
'Report abuse'
do
visit
user_path
(
another_user
)
click_link
'Report abuse'
fill_in
'abuse_report_message'
,
with:
'This user send spam'
click_button
'Send report'
expect
(
page
).
to
have_content
'Thank you for your report'
visit
user_path
(
another_user
)
expect
(
page
).
to
have_button
(
"Already reported for abuse"
)
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