Commit 58601ebd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tests after user password length was changed

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7ed15bbc
...@@ -33,24 +33,24 @@ class Profile < Spinach::FeatureSteps ...@@ -33,24 +33,24 @@ class Profile < Spinach::FeatureSteps
step 'I try change my password w/o old one' do step 'I try change my password w/o old one' do
within '.update-password' do within '.update-password' do
fill_in "user_password", with: "222333" fill_in "user_password", with: "22233344"
fill_in "user_password_confirmation", with: "222333" fill_in "user_password_confirmation", with: "22233344"
click_button "Save" click_button "Save"
end end
end end
step 'I change my password' do step 'I change my password' do
within '.update-password' do within '.update-password' do
fill_in "user_current_password", with: "123456" fill_in "user_current_password", with: "12345678"
fill_in "user_password", with: "222333" fill_in "user_password", with: "22233344"
fill_in "user_password_confirmation", with: "222333" fill_in "user_password_confirmation", with: "22233344"
click_button "Save" click_button "Save"
end end
end end
step 'I unsuccessfully change my password' do step 'I unsuccessfully change my password' do
within '.update-password' do within '.update-password' do
fill_in "user_current_password", with: "123456" fill_in "user_current_password", with: "12345678"
fill_in "user_password", with: "password" fill_in "user_password", with: "password"
fill_in "user_password_confirmation", with: "confirmation" fill_in "user_password_confirmation", with: "confirmation"
click_button "Save" click_button "Save"
......
...@@ -15,7 +15,7 @@ FactoryGirl.define do ...@@ -15,7 +15,7 @@ FactoryGirl.define do
email { Faker::Internet.email } email { Faker::Internet.email }
name name
sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" } sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" }
password "123456" password "12345678"
password_confirmation { password } password_confirmation { password }
confirmed_at { Time.now } confirmed_at { Time.now }
confirmation_token { nil } confirmation_token { nil }
......
...@@ -90,8 +90,8 @@ describe User do ...@@ -90,8 +90,8 @@ describe User do
end end
it "should not generate password by default" do it "should not generate password by default" do
user = create(:user, password: 'abcdefg') user = create(:user, password: 'abcdefghe')
user.password.should == 'abcdefg' user.password.should == 'abcdefghe'
end end
it "should generate password when forcing random password" do it "should generate password when forcing random password" do
......
...@@ -16,7 +16,7 @@ module LoginHelpers ...@@ -16,7 +16,7 @@ module LoginHelpers
def login_with(user) def login_with(user)
visit new_user_session_path visit new_user_session_path
fill_in "user_login", with: user.email fill_in "user_login", with: user.email
fill_in "user_password", with: "123456" fill_in "user_password", with: "12345678"
click_button "Sign in" click_button "Sign in"
Thread.current[:current_user] = user Thread.current[:current_user] = user
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment