Created
October 29, 2017 15:59
-
-
Save domagude/9325758fdfd83a394172808fc9667301 to your computer and use it in GitHub Desktop.
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
require "rails_helper" | |
RSpec.feature "Visit single post", :type => :feature do | |
let(:user) { create(:user) } | |
let(:post) { create(:post) } | |
scenario "User goes to a single post from the home page", js: true do | |
post | |
visit root_path | |
page.find(".single-post-card").click | |
expect(page).to have_selector('body .modal') | |
page.find('.interested a').click | |
expect(page).to have_selector('#single-post-content p', text: post.content) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment