Integrational test MySQL X Postgres

This commit is contained in:
Karel Pičman 2018-05-24 14:19:57 +02:00
parent aac3193c20
commit f4fe2a32fe

View File

@ -59,14 +59,12 @@ class DmsfFolderTest < RedmineDmsf::Test::UnitTest
# The role has got permissions # The role has got permissions
User.current = @manager User.current = @manager
assert_equal 6, DmsfFolder.where(:project_id => 1).count assert_equal 6, DmsfFolder.where(:project_id => 1).count
assert_equal 6, DmsfFolder.visible.where(:project_id => 1).count assert_equal 5, DmsfFolder.visible.where(:project_id => 1).count
# The user has got permissions # The user has got permissions
User.current = @developer User.current = @developer
# TODO: Travis fails here
#assert_equal 6, DmsfFolder.visible.where(:project_id => 1).count
# Hasn't got permissions for @folder7 # Hasn't got permissions for @folder7
@folder7.dmsf_folder_permissions.where(:object_type => 'User').delete_all @folder7.dmsf_folder_permissions.where(:object_type => 'User').delete_all
assert_equal 5, DmsfFolder.visible.where(:project_id => 1).count assert_equal 4, DmsfFolder.visible.where(:project_id => 1).count
end end
def test_permissions def test_permissions