forked from appirio-tech/cs-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
586b672
commit 0b9fa89
Showing
2 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
require 'test_helper' | ||
|
||
class UserTest < ActiveSupport::TestCase | ||
# test "the truth" do | ||
# assert true | ||
# end | ||
|
||
test "should not save" do | ||
user = User.new | ||
assert !user.save, "Saved the user without all required fields" | ||
end | ||
|
||
test "should save" do | ||
user = User.new | ||
user.username = 'me' | ||
user.password = 'mypass' | ||
user.sfdc_username = 'me@something.com' | ||
assert user.save, "Could not save the user" | ||
end | ||
|
||
test "should not save without @ in sfdc_username" do | ||
#user = users(:one) | ||
user = User.new | ||
user.username = 'me' | ||
user.password = 'mypass' | ||
user.sfdc_username = 'mesomething.com' | ||
assert !user.save, "Saved the user without a correctly formatted sfdc_username" | ||
end | ||
|
||
end |