-
Notifications
You must be signed in to change notification settings - Fork 12
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
09294f7
commit 811c365
Showing
3 changed files
with
42 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
describe "the signin process", type: :feature do | ||
before :each do | ||
User.create!(email: '[email protected]', password: 'password') | ||
end | ||
|
||
it "signs me in" do | ||
visit '/users/sign_in' | ||
within("#session") do | ||
fill_in 'Email', with: '[email protected]' | ||
fill_in 'Password', with: 'password' | ||
end | ||
click_button 'Log in' | ||
expect(page).to have_content 'Success' | ||
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "Home", type: :request do | ||
describe "GET /home" do | ||
it "works! (now write some real specs)" do | ||
get root_path | ||
expect(response).to have_http_status(200) | ||
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "home", type: :view do | ||
before do | ||
render | ||
end | ||
|
||
context "renders attributes in <p>" do | ||
it "expect correct text" do | ||
expect(rendered).to match(/Sobre/) | ||
end | ||
|
||
# it "expect correct text" do | ||
# expect(rendered).to match(/MyText/) | ||
# end | ||
end | ||
end |