Sha256: 4d8c303c07147526b0c5be8640c14aa04531fd264a160fbfb130ae3f30c3454c

Contents?: true

Size: 575 Bytes

Versions: 30

Compression:

Stored size: 575 Bytes

Contents

require 'spec_helper'

feature "Scope" do

  background do
    2.times { create(:blog, name: "Featured", featured: true) }
    2.times { create(:blog, name: "Notfeatured", featured: false) }
    sign_in
    visit_blogs_page
  end

  scenario "Default shows all items" do
    page.should have_content "Featured"
    page.should have_content "Notfeatured"
  end

  scenario "filter featured only" do
    click_link "Featured"
    page.should have_content "Featured"
    page.should_not have_content "Notfeatured"
  end

  def visit_blogs_page
    click_link "Blogs"
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
brightcontent-core-2.0.33 spec/features/scope_spec.rb
brightcontent-core-2.0.31 spec/features/scope_spec.rb
brightcontent-core-2.0.30 spec/features/scope_spec.rb
brightcontent-core-2.0.29 spec/features/scope_spec.rb
brightcontent-core-2.0.28 spec/features/scope_spec.rb
brightcontent-core-2.0.27 spec/features/scope_spec.rb
brightcontent-core-2.0.26 spec/features/scope_spec.rb
brightcontent-core-2.0.25 spec/features/scope_spec.rb
brightcontent-core-2.0.24 spec/features/scope_spec.rb
brightcontent-core-2.0.23 spec/features/scope_spec.rb
brightcontent-core-2.0.22 spec/features/scope_spec.rb
brightcontent-core-2.0.21 spec/features/scope_spec.rb
brightcontent-core-2.0.20 spec/features/scope_spec.rb
brightcontent-core-2.0.19 spec/features/scope_spec.rb
brightcontent-core-2.0.18 spec/features/scope_spec.rb
brightcontent-core-2.0.17 spec/features/scope_spec.rb
brightcontent-core-2.0.16 spec/features/scope_spec.rb
brightcontent-core-2.0.15 spec/features/scope_spec.rb
brightcontent-core-2.0.14 spec/features/scope_spec.rb
brightcontent-core-2.0.13 spec/features/scope_spec.rb