summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-01-09 19:30:34 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-02 11:25:44 -0200
commitd20e75a8d80c2828336cd22897ea6868d666f8a5 (patch)
tree9cbf725ad1b523ab0c8d94261d4a02a0677ca450 /features
parent6cffcb05882b0d3c4a02f9acf21806e25ea09ec3 (diff)
downloadgitlab-ce-d20e75a8d80c2828336cd22897ea6868d666f8a5.tar.gz
Support Akismet spam checking for creation of issues via API
Currently any spam detected by Akismet by non-members via API will be logged in a separate table in the admin page. Closes #5612
Diffstat (limited to 'features')
-rw-r--r--features/admin/spam_logs.feature8
-rw-r--r--features/steps/admin/spam_logs.rb18
-rw-r--r--features/steps/shared/paths.rb4
3 files changed, 30 insertions, 0 deletions
diff --git a/features/admin/spam_logs.feature b/features/admin/spam_logs.feature
new file mode 100644
index 00000000000..92a5389e3a4
--- /dev/null
+++ b/features/admin/spam_logs.feature
@@ -0,0 +1,8 @@
+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
diff --git a/features/steps/admin/spam_logs.rb b/features/steps/admin/spam_logs.rb
new file mode 100644
index 00000000000..79d18b036b0
--- /dev/null
+++ b/features/steps/admin/spam_logs.rb
@@ -0,0 +1,18 @@
+class Spinach::Features::AdminSpamLogs < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedAdmin
+
+ step 'I should see list of spam logs' do
+ page.should have_content("Spam Logs")
+ spam_log = SpamLog.first
+ page.should have_content spam_log.title
+ page.should have_content spam_log.description
+ page.should have_link("Remove user")
+ page.should have_link("Block user")
+ end
+
+ step 'spam logs exist' do
+ create(:spam_log)
+ 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