summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2011-11-15 11:08:05 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2011-11-15 11:08:05 +0400
commit003bf61258ea20128315076936f09ea198e56bcb (patch)
tree85345a86c9c72080b4319fffdb11010a9b2b4aac /spec
parent8d74123d61e83c29b5449773e1c471d2e2aa126f (diff)
downloadgitlab-ce-003bf61258ea20128315076936f09ea198e56bcb.tar.gz
add auth token for users
Diffstat (limited to 'spec')
-rw-r--r--spec/models/user_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 14d48114c30..a22aee75b0d 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -19,15 +19,20 @@ describe User do
user.identifier.should == "test_mail.com"
end
+ it "should have authentication token" do
+ user = Factory(:user)
+ user.authentication_token.should_not == ""
+ end
+
describe "dependent" do
- before do
+ before do
@user = Factory :user
- @note = Factory :note,
+ @note = Factory :note,
:author => @user,
:project => Factory(:project)
end
- it "should destroy all notes with user" do
+ it "should destroy all notes with user" do
Note.find_by_id(@note.id).should_not be_nil
@user.destroy
Note.find_by_id(@note.id).should be_nil