Commit c47152e2 authored by jplang's avatar jplang

Don't rely on users fixtures.

git-svn-id: https://svn.redmine.org/redmine/trunk@13512 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent aceb9839
......@@ -263,6 +263,7 @@ class CustomFieldTest < ActiveSupport::TestCase
end
def test_visibile_scope_with_admin_should_return_all_custom_fields
admin = User.generate! {|user| user.admin = true}
CustomField.delete_all
fields = [
CustomField.generate!(:visible => true),
......@@ -271,7 +272,7 @@ class CustomFieldTest < ActiveSupport::TestCase
CustomField.generate!(:visible => false, :role_ids => [1, 2]),
]
assert_equal 4, CustomField.visible(User.find(1)).count
assert_equal 4, CustomField.visible(admin).count
end
def test_visibile_scope_with_non_admin_user_should_return_visible_custom_fields
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment