Created
March 2, 2019 13:23
-
-
Save amalrik/a615a2355e01099a41b2dc76532da4e5 to your computer and use it in GitHub Desktop.
Using Page Object Pattern in rspec - sample1
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
it "can create posts" do | |
login_as(user, :scope => :user) | |
visit new_post_path | |
within("#new_post") do | |
fill_in 'post_title', with: "My super Blog title" | |
fill_in 'post_input_content', with: "##loren loren\n ipsum ipsum" | |
end | |
click_button 'Publish' | |
expect(page).to have_content 'Post was successfully created' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment