Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-02-03 04:26:30 +0300
committerRobert Speicher <robert@gitlab.com>2016-02-03 04:26:30 +0300
commit8a85906a74aff295074c79619d491bea9c947e05 (patch)
treefc4aa22c44ce08a4bf6b823090e5c499b11ecc4a /features/steps
parentfcfafffef5535295e310407a7e3bb4a20ff2fd55 (diff)
parentdffacbb12c0abd4edf677aed2d9e201b41fd2dae (diff)
Merge branch 'support-akismet' into 'master'
Support Akismet spam checking for creation of issues via API Currently any spam detected by Akismet for non-members via API will be logged in a separate table in the admin page. Closes #5612 See merge request !2266
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/admin/spam_logs.rb28
-rw-r--r--features/steps/shared/paths.rb4
2 files changed, 32 insertions, 0 deletions
diff --git a/features/steps/admin/spam_logs.rb b/features/steps/admin/spam_logs.rb
new file mode 100644
index 00000000000..ad825fd414c
--- /dev/null
+++ b/features/steps/admin/spam_logs.rb
@@ -0,0 +1,28 @@
+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
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 4264c9c6f1a..2c854ac7bf9 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -191,6 +191,10 @@ module SharedPaths
visit admin_application_settings_path
end
+ step 'I visit spam logs page' do
+ visit admin_spam_logs_path
+ end
+
step 'I visit applications page' do
visit admin_applications_path
end