diff options
| author | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:07:50 -0400 |
|---|---|---|
| committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:25:15 -0400 |
| commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
| tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /spec/models/user_spec.rb | |
| parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) | |
| download | gitlab-ce-775418918782d5284000ed0bfea364458c748567.tar.gz | |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'spec/models/user_spec.rb')
| -rw-r--r-- | spec/models/user_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 89e0f96f51c..265dcef1e77 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -18,29 +18,29 @@ describe User do end it "should return valid identifier" do - user = User.new(:email => "test@mail.com") + user = User.new(email: "test@mail.com") user.identifier.should == "test_mail_com" end it "should return identifier without + sign" do - user = User.new(:email => "test+foo@mail.com") + user = User.new(email: "test+foo@mail.com") user.identifier.should == "test_foo_mail_com" end it "should execute callback when force_random_password specified" do - user = User.new(:email => "test@mail.com", :force_random_password => true) + user = User.new(email: "test@mail.com", force_random_password: true) user.should_receive(:generate_password) user.save end it "should not generate password by default" do - user = Factory(:user, :password => 'abcdefg', :password_confirmation => 'abcdefg') + user = Factory(:user, password: 'abcdefg', password_confirmation: 'abcdefg') user.password.should == 'abcdefg' end it "should generate password when forcing random password" do Devise.stub(:friendly_token).and_return('123456789') - user = User.create(:email => "test1@mail.com", :force_random_password => true) + user = User.create(email: "test1@mail.com", force_random_password: true) user.password.should == user.password_confirmation user.password.should == '12345678' end @@ -54,8 +54,8 @@ describe User do before do @user = Factory :user @note = Factory :note, - :author => @user, - :project => Factory(:project) + author: @user, + project: Factory(:project) end it "should destroy all notes with user" do |
