Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
1b3b90db
Commit
1b3b90db
authored
Jun 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove teams specs
parent
e1882b53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
45 deletions
+0
-45
spec/lib/gitlab/user_team_manager_spec.rb
spec/lib/gitlab/user_team_manager_spec.rb
+0
-28
spec/models/user_spec.rb
spec/models/user_spec.rb
+0
-17
No files found.
spec/lib/gitlab/user_team_manager_spec.rb
deleted
100644 → 0
View file @
e1882b53
require
'spec_helper'
describe
Gitlab
::
UserTeamManager
do
before
do
@user
=
create
:user
@project
=
create
:project
,
creator:
@user
@master
=
create
:user
@developer
=
create
:user
@reporter
=
create
:user
@project
.
team
<<
[
@master
,
:master
]
@project
.
team
<<
[
@developer
,
:developer
]
@project
.
team
<<
[
@reporter
,
:reporter
]
@team
=
create
:user_team
,
owner:
@user
@team
.
add_members
([
@master
.
id
,
@developer
.
id
,
@reporter
.
id
],
UsersProject
::
DEVELOPER
,
false
)
end
it
"should assign team to project with correct permissions result"
do
@team
.
assign_to_project
(
@project
,
UsersProject
::
MASTER
)
@project
.
users_projects
.
find_by_user_id
(
@master
).
project_access
.
should
==
UsersProject
::
MASTER
@project
.
users_projects
.
find_by_user_id
(
@developer
).
project_access
.
should
==
UsersProject
::
DEVELOPER
@project
.
users_projects
.
find_by_user_id
(
@reporter
).
project_access
.
should
==
UsersProject
::
DEVELOPER
end
end
spec/models/user_spec.rb
View file @
1b3b90db
...
@@ -148,23 +148,6 @@ describe User do
...
@@ -148,23 +148,6 @@ describe User do
it
{
@user
.
owned_groups
.
should
==
[
@group
]
}
it
{
@user
.
owned_groups
.
should
==
[
@group
]
}
end
end
describe
'teams'
do
before
do
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
@admin
=
create
:user
,
admin:
true
@user1
=
create
:user
@user2
=
create
:user
@team
=
create
:user_team
,
owner:
@user1
end
it
{
@admin
.
authorized_teams
.
should
==
[
@team
]
}
it
{
@user1
.
authorized_teams
.
should
==
[
@team
]
}
it
{
@user2
.
authorized_teams
.
should
be_empty
}
it
{
@admin
.
should
be_can
(
:manage_user_team
,
@team
)
}
it
{
@user1
.
should
be_can
(
:manage_user_team
,
@team
)
}
it
{
@user2
.
should_not
be_can
(
:manage_user_team
,
@team
)
}
end
describe
'namespaced'
do
describe
'namespaced'
do
before
do
before
do
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment