summaryrefslogtreecommitdiff
path: root/features/steps/abuse_reports.rb
diff options
context:
space:
mode:
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