BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b4fe5a76
Commit
b4fe5a76
authored
Jun 17, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix UsersGroup specs
parent
fcc1ba5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
users_group.rb
app/models/users_group.rb
+1
-1
users_group_spec.rb
spec/models/users_group_spec.rb
+2
-2
No files found.
app/models/users_group.rb
View file @
b4fe5a76
...
...
@@ -18,7 +18,7 @@ class UsersGroup < ActiveRecord::Base
attr_accessible
:group_access
,
:user_id
belongs_to
:user
belongs_to
:
project
belongs_to
:
group
scope
:guests
,
->
{
where
(
group_access:
GUEST
)
}
scope
:reporters
,
->
{
where
(
group_access:
REPORTER
)
}
...
...
spec/models/users_group_spec.rb
View file @
b4fe5a76
...
...
@@ -13,10 +13,10 @@ describe UsersGroup do
describe
"Validation"
do
let!
(
:users_group
)
{
create
(
:users_group
)
}
it
{
should
validate_presence_of
(
:user
)
}
it
{
should
validate_presence_of
(
:user
_id
)
}
it
{
should
validate_uniqueness_of
(
:user_id
).
scoped_to
(
:group_id
).
with_message
(
/already exists/
)
}
it
{
should
validate_presence_of
(
:group
)
}
it
{
should
validate_presence_of
(
:group
_id
)
}
it
{
should
ensure_inclusion_of
(
:group_access
).
in_array
(
UsersGroup
.
group_access_roles
.
values
)
}
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