Cross Reference:
xref
: /
ontohub
/
test
/
unit
/
team_user_test.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
team_user_test.rb revision 04ff797f3ad57f3671b7f7063c782b9d2faf3882
require
'test_helper'
class
TeamUserTest
<
ActiveSupport
::
TestCase
context
'Associations'
do
should
belong_to
:
team
should
belong_to
:
user
end
context
'Team Users'
do
setup
do
@
team_user
=
Factory
:
team_user
@
another_one
=
Factory
:
user
@
team_user.team.users
<< @
another_one
end
should
'have team'
do
assert_not_nil
@
team_user.team
end
should
'be admin, if first'
do
assert
@
team_user.admin
?
end
should
'not be admin, if not first'
do
assert
!@
another_one.admin
?
end
end
end