-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9aa2303
commit a2b2f83
Showing
3 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
require 'rails_helper' | ||
|
||
describe "Edit author page", type: :feature do | ||
|
||
it "should render withour error" do | ||
describe 'Edit author page', type: :feature do | ||
it 'should render without error' do | ||
@alan = FactoryGirl.create :author | ||
visit edit_author_path(@alan) | ||
end | ||
|
||
end | ||
it 'should edit with no error' do | ||
@alan = FactoryGirl.create :author | ||
visit edit_author_path(@alan) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
require 'rails_helper' | ||
|
||
describe "Index author page", type: :feature do | ||
|
||
it "should render withour error" do | ||
describe 'Index author page', type: :feature do | ||
it 'should render without error' do | ||
visit authors_path | ||
end | ||
|
||
it "should display alan" do | ||
it 'should display alan' do | ||
FactoryGirl.create :author | ||
visit authors_path | ||
|
||
expect(page.text).to match(/alan turing/i) | ||
expect(page.text).to match(/http:\/\/wikipedia\.de\/Alan_Turing/i) | ||
end | ||
|
||
it "should display a link to create new authors" do | ||
it 'should display a link to create new authors' do | ||
visit authors_path | ||
|
||
expect(page).to have_link('Add author') | ||
end | ||
|
||
it "should display a link to show alan's details" do | ||
it 'should display a link to show alan\'s details' do | ||
FactoryGirl.create :author | ||
visit authors_path | ||
|
||
expect(page).to have_link('Show') | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
require 'rails_helper' | ||
|
||
describe "Show author page", type: :feature do | ||
|
||
it "should render withour error" do | ||
describe 'Show author page', type: :feature do | ||
it 'should render withour error' do | ||
@alan = FactoryGirl.create :author | ||
visit author_path(@alan) | ||
end | ||
|
||
it "should display the first_name" do | ||
it 'should display the first_name' do | ||
@alan = FactoryGirl.create :author | ||
visit author_path(@alan) | ||
|
||
expect(page.text).to match(/first name: alan/i) | ||
end | ||
|
||
end | ||
end |