Cross Reference:
xref
: /
ontohub
/
test
/
unit
/
repository_test.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
repository_test.rb revision f1304db188bff0f7c40172819863ffe54401b400
require
'test_helper'
class
RepositoryTest
<
ActiveSupport
::
TestCase
should
have_many
:
ontologies
should
have_many
:
permissions
context
"a repository"
do
setup
do
@
user
=
FactoryGirl.create
:
user
@
repository
=
FactoryGirl.create
:
repository
,
user
: @
user
end
context
'creating a permission'
do
setup
do
assert_not_nil
@
permission
= @
repository.permissions.first
end
should
'with subject'
do
assert_equal
@
user
, @
permission.subject
end
should
'with role owner'
do
assert_equal
'owner'
, @
permission.role
end
end
end
end