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
906b44e5
Commit
906b44e5
authored
Jul 21, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix post factory
parent
bd262a8c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
spec/factories/posts.rb
+1
-0
spec/models/notification_spec.rb
+2
-1
spec/models/post_spec.rb
+3
-7
No files found.
spec/factories/posts.rb
View file @
906b44e5
...
...
@@ -17,6 +17,7 @@
FactoryGirl
.
define
do
factory
:post
do
association
:author
,
factory: :alice
title
'sample title'
body
'sample body'
specified_date
Date
.
new
(
2014
,
4
,
1
)
...
...
spec/models/notification_spec.rb
View file @
906b44e5
...
...
@@ -16,7 +16,8 @@ require 'rails_helper'
describe
Notification
do
describe
'Instance method'
do
let
(
:alice
)
{
create
(
:alice
)
}
let
(
:bob
)
{
create
(
:bob
)
}
let
(
:post
)
{
create
(
:post
)
}
it
"notifies on post edited"
do
end
...
...
spec/models/post_spec.rb
View file @
906b44e5
...
...
@@ -20,17 +20,13 @@ describe Post do
describe
'Instance method'
do
before
:each
do
@post
=
create
(
:post
)
@
alice
=
create
(
:alice
)
@new_post
=
@post
.
generate_fork
(
@
alice
)
@
bob
=
create
(
:bob
)
@new_post
=
@post
.
generate_fork
(
@
bob
)
@new_post
.
save
end
describe
'Fork'
do
# subject {
# @post.generate_fork(@alice).save
# }
it
'duplicated'
do
expect
(
@new_post
.
id
).
not_to
eq
(
@post
.
id
)
end
...
...
@@ -44,7 +40,7 @@ describe Post do
end
it
'valid user'
do
expect
(
@new_post
.
author
).
to
eq
(
@
alice
)
expect
(
@new_post
.
author
).
to
eq
(
@
bob
)
end
it
'valid user'
do
...
...
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