Sha256: 3df262de81df6ebe02df42164cc6dc75af44cf95f1596d3491af72c8dea4b7db

Contents?: true

Size: 574 Bytes

Versions: 9

Compression:

Stored size: 574 Bytes

Contents

require "rails_helper"

RSpec.feature "Viewing posts by tag", :type => :feature do
  scenario "a visitor can view published posts by clicking a tag" do
    tag1 = create(:tag, label: 'tag1')
    tag2 = create(:tag, label: 'tag2')
    post1 = create(:post, published: true, title: 'post1', tags: [tag1])
    post2 = create(:post, published: true, title: 'post2', tags: [tag2])

    visit exposition_path
    click_on 'tag1'

    expect(current_path).to eq(exposition.tag_path(tag1))
    expect(page).to have_text('post1')
    expect(page).to_not have_text('post2')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exposition-0.0.5.7.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.5.6.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.5.5.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.5.4.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.5.2.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.5.1.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.5.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.4.pre.alpha spec/features/viewing_posts_by_tag_spec.rb
exposition-0.0.3.pre.alpha spec/features/viewing_posts_by_tag_spec.rb