A little refactor and language change due to core auth steps & factories
This commit is contained in:
parent
518ee00e0c
commit
d23c10db70
2 changed files with 4 additions and 8 deletions
|
@ -7,8 +7,8 @@ Feature: Blog Post Authors
|
|||
|
||||
When I am on the new blog post form
|
||||
And I fill in "Title" with "This is my blog post"
|
||||
And I fill in "Body" with "And I am hubble"
|
||||
And I fill in "Body" with "And I love it"
|
||||
And I press "Save"
|
||||
|
||||
Then there should be 1 blog post
|
||||
And the blog post should belong to "hubble"
|
||||
And the blog post should belong to me
|
|
@ -1,11 +1,7 @@
|
|||
Given /^there is a user named "([^\"]*)"$/ do |login|
|
||||
@user = Factory.create(:user, :login => login)
|
||||
end
|
||||
|
||||
Then /^there should be (\d+) blog posts?$/ do |num|
|
||||
BlogPost.all.size == num
|
||||
end
|
||||
|
||||
Then /^the blog post should belong to "([^\"]*)"$/ do |login|
|
||||
BlogPost.first.author.login == login
|
||||
Then /^the blog post should belong to me$/
|
||||
BlogPost.first.author.login == User.last.login
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue