mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 13:38:24 -04:00
added failing tests for logging in by username
This commit is contained in:
@@ -5,6 +5,7 @@ describe 'user' do
|
||||
before(:each) do
|
||||
@user = User.new
|
||||
@user.email = "example@example.com"
|
||||
@user.username = "Someone"
|
||||
@user.password = "irrelevant"
|
||||
end
|
||||
|
||||
@@ -15,7 +16,8 @@ describe 'user' do
|
||||
it 'should be fetchable from the database' do
|
||||
@user.save
|
||||
@user2 = User.find_by_email('example@example.com')
|
||||
@user2.email.should_not be_nil
|
||||
@user2.email.should == "example@example.com"
|
||||
@user2.username.should == "Someone"
|
||||
@user2.encrypted_password.should_not be_nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user