Skip to content

Instantly share code, notes, and snippets.

@domagude
Created October 29, 2017 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domagude/9325758fdfd83a394172808fc9667301 to your computer and use it in GitHub Desktop.
Save domagude/9325758fdfd83a394172808fc9667301 to your computer and use it in GitHub Desktop.
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