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
Boxiang Sun
gitlab-ce
Commits
a4cd7386
Commit
a4cd7386
authored
Oct 09, 2012
by
Andrey Kumanyaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests fix
parent
df7c5248
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
10 deletions
+10
-10
spec/models/group_spec.rb
spec/models/group_spec.rb
+1
-1
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+1
-1
spec/models/protected_branch_spec.rb
spec/models/protected_branch_spec.rb
+1
-1
spec/models/snippet_spec.rb
spec/models/snippet_spec.rb
+2
-2
spec/models/users_project_spec.rb
spec/models/users_project_spec.rb
+2
-2
spec/models/wiki_spec.rb
spec/models/wiki_spec.rb
+1
-1
spec/roles/issue_commonality_spec.rb
spec/roles/issue_commonality_spec.rb
+2
-2
No files found.
spec/models/group_spec.rb
View file @
a4cd7386
...
...
@@ -20,5 +20,5 @@ describe Group do
it
{
should
validate_uniqueness_of
(
:name
)
}
it
{
should
validate_presence_of
:code
}
it
{
should
validate_uniqueness_of
(
:code
)
}
it
{
should
validate_presence_of
:owner
_id
}
it
{
should
validate_presence_of
:owner
}
end
spec/models/milestone_spec.rb
View file @
a4cd7386
...
...
@@ -12,7 +12,7 @@ describe Milestone do
describe
"Validation"
do
it
{
should
validate_presence_of
(
:title
)
}
it
{
should
validate_presence_of
(
:project
_id
)
}
it
{
should
validate_presence_of
(
:project
)
}
it
{
should
ensure_inclusion_of
(
:closed
).
in_array
([
true
,
false
])
}
end
...
...
spec/models/protected_branch_spec.rb
View file @
a4cd7386
...
...
@@ -10,7 +10,7 @@ describe ProtectedBranch do
end
describe
'Validation'
do
it
{
should
validate_presence_of
(
:project
_id
)
}
it
{
should
validate_presence_of
(
:project
)
}
it
{
should
validate_presence_of
(
:name
)
}
end
...
...
spec/models/snippet_spec.rb
View file @
a4cd7386
...
...
@@ -13,8 +13,8 @@ describe Snippet do
end
describe
"Validation"
do
it
{
should
validate_presence_of
(
:author
_id
)
}
it
{
should
validate_presence_of
(
:project
_id
)
}
it
{
should
validate_presence_of
(
:author
)
}
it
{
should
validate_presence_of
(
:project
)
}
it
{
should
validate_presence_of
(
:title
)
}
it
{
should
ensure_length_of
(
:title
).
is_within
(
0
..
255
)
}
...
...
spec/models/users_project_spec.rb
View file @
a4cd7386
...
...
@@ -13,10 +13,10 @@ describe UsersProject do
describe
"Validation"
do
let!
(
:users_project
)
{
create
(
:users_project
)
}
it
{
should
validate_presence_of
(
:user
_id
)
}
it
{
should
validate_presence_of
(
:user
)
}
it
{
should
validate_uniqueness_of
(
:user_id
).
scoped_to
(
:project_id
).
with_message
(
/already exists/
)
}
it
{
should
validate_presence_of
(
:project
_id
)
}
it
{
should
validate_presence_of
(
:project
)
}
end
describe
"Delegate methods"
do
...
...
spec/models/wiki_spec.rb
View file @
a4cd7386
...
...
@@ -16,6 +16,6 @@ describe Wiki do
it
{
should
validate_presence_of
(
:title
)
}
it
{
should
ensure_length_of
(
:title
).
is_within
(
1
..
250
)
}
it
{
should
validate_presence_of
(
:content
)
}
it
{
should
validate_presence_of
(
:user
_id
)
}
it
{
should
validate_presence_of
(
:user
)
}
end
end
spec/roles/issue_commonality_spec.rb
View file @
a4cd7386
...
...
@@ -11,8 +11,8 @@ describe Issue, "IssueCommonality" do
end
describe
"Validation"
do
it
{
should
validate_presence_of
(
:project
_id
)
}
it
{
should
validate_presence_of
(
:author
_id
)
}
it
{
should
validate_presence_of
(
:project
)
}
it
{
should
validate_presence_of
(
:author
)
}
it
{
should
validate_presence_of
(
:title
)
}
it
{
should
ensure_length_of
(
:title
).
is_at_least
(
0
).
is_at_most
(
255
)
}
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