summaryrefslogtreecommitdiff
path: root/test/integration/browser/admin_test.rb
blob: 2d3f98861dae0a4faa5f6b90412d941447d34154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"
      within "##{dom_id(id)}" do
        assert page.has_content? id.login
        click_on "Destroy"
      end
      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