forked from fixin.me/fixin.me
Test "sign in"
This commit is contained in:
1
test/fixtures/users.yml
vendored
1
test/fixtures/users.yml
vendored
@@ -1,3 +1,4 @@
|
||||
admin:
|
||||
email: admin@dev27.fixin.me
|
||||
status: admin
|
||||
encrypted_password: <%= Devise::Encryptor.digest(User, 'admin') %>
|
||||
|
||||
@@ -7,6 +7,11 @@ class UsersTest < ApplicationSystemTestCase
|
||||
|
||||
test "sign in" do
|
||||
visit new_user_session_url
|
||||
fill_in User.human_attribute_name(:email), with: @admin.email
|
||||
fill_in User.human_attribute_name(:password), with: 'admin'
|
||||
click_on t(:sign_in)
|
||||
assert_no_current_path new_user_session_path
|
||||
assert_text t('devise.sessions.signed_in')
|
||||
end
|
||||
|
||||
#test "visiting the index" do
|
||||
|
||||
@@ -9,5 +9,5 @@ class ActiveSupport::TestCase
|
||||
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
||||
fixtures :all
|
||||
|
||||
# Add more helper methods to be used by all tests here...
|
||||
include AbstractController::Translation
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user