summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mail_handler_test.rb2
-rw-r--r--test/unit/user_test.rb14
2 files changed, 6 insertions, 10 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 8cac2d8b9..833506a16 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -18,7 +18,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class MailHandlerTest < Test::Unit::TestCase
- fixtures :users, :projects, :roles, :members, :permissions, :issues, :permissions_roles, :trackers, :enumerations
+ fixtures :users, :projects, :roles, :members, :issues, :trackers, :enumerations
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
CHARSET = "utf-8"
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 66cd72472..52776c62f 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -88,16 +88,12 @@ class UserTest < Test::Unit::TestCase
end
def test_rss_key
- assert_nil @jsmith.rss_key
- key = @jsmith.get_or_create_rss_key
- assert_kind_of Token, key
- assert_equal 40, key.value.length
+ assert_nil @jsmith.rss_token
+ key = @jsmith.rss_key
+ assert_equal 40, key.length
@jsmith.reload
- assert_equal key.value, @jsmith.get_or_create_rss_key.value
-
- @jsmith.reload
- assert_equal key.value, @jsmith.rss_key.value
+ assert_equal key, @jsmith.rss_key
end
def test_role_for_project
@@ -107,6 +103,6 @@ class UserTest < Test::Unit::TestCase
assert_equal "Manager", role.name
# user with no role
- assert_nil @dlopper.role_for_project(Project.find(2))
+ assert !@dlopper.role_for_project(Project.find(2)).member?
end
end