Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
8d2aae69
Commit
8d2aae69
authored
Jan 17, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
…
parent
dafeb542
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
spec/models/post_spec.rb
+12
-5
No files found.
spec/models/post_spec.rb
View file @
8d2aae69
...
@@ -6,26 +6,33 @@ describe Post do
...
@@ -6,26 +6,33 @@ describe Post do
before
:each
do
before
:each
do
@post
=
create
(
:post
)
@post
=
create
(
:post
)
@alice
=
create
(
:alice
)
@alice
=
create
(
:alice
)
@new_post
=
@post
.
generate_fork
(
@alice
).
save
end
end
describe
'Fork'
do
describe
'Fork'
do
subject
{
@post
.
generate_fork
(
@alice
)
}
# subject {
# @post.generate_fork(@alice).save
# }
it
'duplicated'
do
expect
(
@new_post
.
id
).
not_to
eq
(
@post
.
id
)
end
it
'valid title'
do
it
'valid title'
do
expect
(
subjec
t
.
title
).
to
eq
(
'sample title'
)
expect
(
@new_pos
t
.
title
).
to
eq
(
'sample title'
)
end
end
it
'valid body'
do
it
'valid body'
do
expect
(
subjec
t
.
body
).
to
eq
(
'sample body'
)
expect
(
@new_pos
t
.
body
).
to
eq
(
'sample body'
)
end
end
it
'valid user'
do
it
'valid user'
do
expect
(
subjec
t
.
author
).
to
eq
(
@alice
)
expect
(
@new_pos
t
.
author
).
to
eq
(
@alice
)
end
end
it
'valid user'
do
it
'valid user'
do
expect
(
subjec
t
.
tags
).
to
include
(
@post
.
tags
.
first
)
expect
(
@new_pos
t
.
tags
).
to
include
(
@post
.
tags
.
first
)
end
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