aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/auth_test.rb
blob: f5c94e441b12f62ddac6402a816da40ce450484d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'integration_test_helper'


class TestAuth < CapybaraTestCase
  def setup
    visit '/'
  end

  def test_index_has_login_form
    assert_text 'Login'
    assert has_selector?('//form')
  end

  def test_login
    fill_in 'username', :with => 'hubertfarnsworth'
    fill_in 'password', :with => 'secret'
    click_button 'Login'

    assert_equal 200, page.status_code
  end
end