Sha256: 616b38c2c93f85ee3b8ee23e4c58d929bbde2272825862c734aaa0c93b7ef33c

Contents?: true

Size: 849 Bytes

Versions: 28

Compression:

Stored size: 849 Bytes

Contents

require 'test_helper'

class Admin::UsersSectionTest < IT
  include Loco::Emitter
  include AdminHelpers

  def setup
    super
    sign_in
  end

  test "signing in" do
    assert page.has_content?('Successfully signed in.')
  end

  test "confirming user" do
    within("#user_#{users(:user_jane).id}") do
      click_on "Edit"
    end
    check "Confirmed"
    click_on "Update User"
    assert page.has_selector?("input[type=submit][value='User updated!']")
    click_on 'Back'
    assert_equal 'Yes', find("#user_#{users(:user_jane).id}").find('td.confirmed').text
  end

  test "should auto load recently added user" do
    user = User.create! email: 'david@example.com', username: 'david',
      password: 'secret', password_confirmation: 'secret'
    emit user, :created, for: Admin
    assert page.has_content? 'david@example.com'
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
loco-rails-3.0.5 test/integration/admin/users_section_test.rb
loco-rails-3.0.4 test/integration/admin/users_section_test.rb
loco-rails-3.0.3 test/integration/admin/users_section_test.rb
loco-rails-2.5.3 test/integration/admin/users_section_test.rb
loco-rails-2.5.2 test/integration/admin/users_section_test.rb
loco-rails-3.0.2 test/integration/admin/users_section_test.rb
loco-rails-3.0.1 test/integration/admin/users_section_test.rb
loco-rails-2.5.1 test/integration/admin/users_section_test.rb
loco-rails-2.5.0 test/integration/admin/users_section_test.rb
loco-rails-2.4.0 test/integration/admin/users_section_test.rb
loco-rails-2.3.0 test/integration/admin/users_section_test.rb
loco-rails-3.0.0 test/integration/admin/users_section_test.rb
loco-rails-2.2.2 test/integration/admin/users_section_test.rb
loco-rails-2.2.1 test/integration/admin/users_section_test.rb
loco-rails-2.2.0 test/integration/admin/users_section_test.rb
loco-rails-2.1.0 test/integration/admin/users_section_test.rb
loco-rails-2.0.0 test/integration/admin/users_section_test.rb
loco-rails-1.5.2 test/integration/admin/users_section_test.rb
loco-rails-1.5.1 test/integration/admin/users_section_test.rb
loco-rails-1.5.0 test/integration/admin/users_section_test.rb