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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
837685d5
Commit
837685d5
authored
Nov 28, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge request model specs
parent
bfb0bdbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+24
-1
No files found.
spec/models/merge_request_spec.rb
View file @
837685d5
require
'spec_helper'
describe
MergeRequest
do
pending
"add some examples to (or delete)
#{
__FILE__
}
"
describe
"Associations"
do
it
{
should
belong_to
(
:project
)
}
it
{
should
belong_to
(
:author
)
}
it
{
should
belong_to
(
:assignee
)
}
end
describe
"Validation"
do
it
{
should
validate_presence_of
(
:target_branch
)
}
it
{
should
validate_presence_of
(
:source_branch
)
}
it
{
should
validate_presence_of
(
:title
)
}
it
{
should
validate_presence_of
(
:author_id
)
}
it
{
should
validate_presence_of
(
:project_id
)
}
it
{
should
validate_presence_of
(
:assignee_id
)
}
end
describe
"Scope"
do
it
{
MergeRequest
.
should
respond_to
:closed
}
it
{
MergeRequest
.
should
respond_to
:opened
}
end
it
{
Factory
.
create
(
:merge_request
,
:author
=>
Factory
(
:user
),
:assignee
=>
Factory
(
:user
),
:project
=>
Factory
.
create
(
:project
)).
should
be_valid
}
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