summaryrefslogtreecommitdiff
path: root/features/steps/abuse_reports.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-07 15:05:17 +0200
committerDouwe Maan <douwe@gitlab.com>2015-08-07 15:05:17 +0200
commitad55f0d6f9ec29026b36ee32ff5fc6081e3793de (patch)
treecd2b9919de1d5597922ac0ac1c2c3dc9a54a0ab0 /features/steps/abuse_reports.rb
parent8b6ae0104df7e053ff3ad06e089c96273854c4e3 (diff)
parent4b7c2f0b503eb7400cee4cd5011733d689393691 (diff)
downloadgitlab-ce-comment-updated-by.tar.gz
Merge branch 'master' into comment-updated-bycomment-updated-by
Diffstat (limited to 'features/steps/abuse_reports.rb')
-rw-r--r--features/steps/abuse_reports.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/features/steps/abuse_reports.rb b/features/steps/abuse_reports.rb
new file mode 100644
index 00000000000..8f9ddb2899f
--- /dev/null
+++ b/features/steps/abuse_reports.rb
@@ -0,0 +1,28 @@
+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
+
+ def user_mike
+ @user_mike ||= create(:user, name: 'Mike')
+ end
+end