summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-07-09 13:25:31 +0200
committerazul <azul@leap.se>2014-07-09 13:25:31 +0200
commitdc740e4311101bf7297996788b25a99edafbe759 (patch)
treed989456179551fb167f6c41ba4b54bbd4a77a7ac /test/integration
parent19da5429308412c19176733d2b32ccbf2c08df1c (diff)
parent0cc11ebb609de225fbeacbf80788b992b88b6ce6 (diff)
Merge pull request #173 from azul/feature/unblock-handles
Allow admins to unblock handles
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/browser/admin_test.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/integration/browser/admin_test.rb b/test/integration/browser/admin_test.rb
new file mode 100644
index 0000000..902c981
--- /dev/null
+++ b/test/integration/browser/admin_test.rb
@@ -0,0 +1,28 @@
+require 'test_helper'
+
+class AdminTest < BrowserIntegrationTest
+
+ test "clear blocked handle" do
+ id = FactoryGirl.create :identity
+ submit_signup(id.login)
+ assert page.has_content?('has already been taken')
+ login
+ with_config admins: [@user.login] do
+ visit '/'
+ click_on "Usernames"
+ fill_in 'query', with: id.login[0]
+ click_on "Search"
+ within "##{dom_id(id)}" do
+ assert page.has_content? id.login
+ click_on "Destroy"
+ end
+ fill_in 'query', with: id.login[0]
+ click_on "Search"
+ assert page.has_no_content? id.login
+ click_on 'Log Out'
+ end
+ submit_signup(id.login)
+ assert page.has_content?("Welcome #{id.login}")
+ click_on 'Log Out'
+ end
+end