Commit 58601ebdab0cfa90e823418ccd587a0a503a985f
1 parent
7ed15bbc
Exists in
master
and in
4 other branches
Fix tests after user password length was changed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
4 changed files
with
10 additions
and
10 deletions
Show diff stats
features/steps/profile/profile.rb
@@ -33,24 +33,24 @@ class Profile < Spinach::FeatureSteps | @@ -33,24 +33,24 @@ class Profile < Spinach::FeatureSteps | ||
33 | 33 | ||
34 | step 'I try change my password w/o old one' do | 34 | step 'I try change my password w/o old one' do |
35 | within '.update-password' do | 35 | within '.update-password' do |
36 | - fill_in "user_password", with: "222333" | ||
37 | - fill_in "user_password_confirmation", with: "222333" | 36 | + fill_in "user_password", with: "22233344" |
37 | + fill_in "user_password_confirmation", with: "22233344" | ||
38 | click_button "Save" | 38 | click_button "Save" |
39 | end | 39 | end |
40 | end | 40 | end |
41 | 41 | ||
42 | step 'I change my password' do | 42 | step 'I change my password' do |
43 | within '.update-password' do | 43 | within '.update-password' do |
44 | - fill_in "user_current_password", with: "123456" | ||
45 | - fill_in "user_password", with: "222333" | ||
46 | - fill_in "user_password_confirmation", with: "222333" | 44 | + fill_in "user_current_password", with: "12345678" |
45 | + fill_in "user_password", with: "22233344" | ||
46 | + fill_in "user_password_confirmation", with: "22233344" | ||
47 | click_button "Save" | 47 | click_button "Save" |
48 | end | 48 | end |
49 | end | 49 | end |
50 | 50 | ||
51 | step 'I unsuccessfully change my password' do | 51 | step 'I unsuccessfully change my password' do |
52 | within '.update-password' do | 52 | within '.update-password' do |
53 | - fill_in "user_current_password", with: "123456" | 53 | + fill_in "user_current_password", with: "12345678" |
54 | fill_in "user_password", with: "password" | 54 | fill_in "user_password", with: "password" |
55 | fill_in "user_password_confirmation", with: "confirmation" | 55 | fill_in "user_password_confirmation", with: "confirmation" |
56 | click_button "Save" | 56 | click_button "Save" |
spec/factories.rb
@@ -15,7 +15,7 @@ FactoryGirl.define do | @@ -15,7 +15,7 @@ FactoryGirl.define do | ||
15 | email { Faker::Internet.email } | 15 | email { Faker::Internet.email } |
16 | name | 16 | name |
17 | sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" } | 17 | sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" } |
18 | - password "123456" | 18 | + password "12345678" |
19 | password_confirmation { password } | 19 | password_confirmation { password } |
20 | confirmed_at { Time.now } | 20 | confirmed_at { Time.now } |
21 | confirmation_token { nil } | 21 | confirmation_token { nil } |
spec/models/user_spec.rb
@@ -90,8 +90,8 @@ describe User do | @@ -90,8 +90,8 @@ describe User do | ||
90 | end | 90 | end |
91 | 91 | ||
92 | it "should not generate password by default" do | 92 | it "should not generate password by default" do |
93 | - user = create(:user, password: 'abcdefg') | ||
94 | - user.password.should == 'abcdefg' | 93 | + user = create(:user, password: 'abcdefghe') |
94 | + user.password.should == 'abcdefghe' | ||
95 | end | 95 | end |
96 | 96 | ||
97 | it "should generate password when forcing random password" do | 97 | it "should generate password when forcing random password" do |
spec/support/login_helpers.rb
@@ -16,7 +16,7 @@ module LoginHelpers | @@ -16,7 +16,7 @@ module LoginHelpers | ||
16 | def login_with(user) | 16 | def login_with(user) |
17 | visit new_user_session_path | 17 | visit new_user_session_path |
18 | fill_in "user_login", with: user.email | 18 | fill_in "user_login", with: user.email |
19 | - fill_in "user_password", with: "123456" | 19 | + fill_in "user_password", with: "12345678" |
20 | click_button "Sign in" | 20 | click_button "Sign in" |
21 | Thread.current[:current_user] = user | 21 | Thread.current[:current_user] = user |
22 | end | 22 | end |