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
iv
gitlab-ce
Commits
21f7c99c
Commit
21f7c99c
authored
Jun 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
group add_users spec
parent
a0640600
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
spec/models/group_spec.rb
spec/models/group_spec.rb
+12
-1
No files found.
spec/models/group_spec.rb
View file @
21f7c99c
...
@@ -17,7 +17,11 @@ require 'spec_helper'
...
@@ -17,7 +17,11 @@ require 'spec_helper'
describe
Group
do
describe
Group
do
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
it
{
should
have_many
:projects
}
describe
"Associations"
do
it
{
should
have_many
:projects
}
it
{
should
have_many
:users_groups
}
end
it
{
should
validate_presence_of
:name
}
it
{
should
validate_presence_of
:name
}
it
{
should
validate_uniqueness_of
(
:name
)
}
it
{
should
validate_uniqueness_of
(
:name
)
}
it
{
should
validate_presence_of
:path
}
it
{
should
validate_presence_of
:path
}
...
@@ -31,4 +35,11 @@ describe Group do
...
@@ -31,4 +35,11 @@ describe Group do
describe
:human_name
do
describe
:human_name
do
it
{
group
.
human_name
.
should
==
group
.
name
}
it
{
group
.
human_name
.
should
==
group
.
name
}
end
end
describe
:add_users
do
let
(
:user
)
{
create
(
:user
)
}
before
{
group
.
add_users
([
user
.
id
],
UsersGroup
::
MASTER
)
}
it
{
group
.
users_groups
.
masters
.
map
(
&
:user
).
should
include
(
user
)
}
end
end
end
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