Sha256: 5e986df1e14e4497ed41c96498beaa1ad544d9d2309ba0e7d5a923eb23c7b4c8
Contents?: true
Size: 853 Bytes
Versions: 1
Compression:
Stored size: 853 Bytes
Contents
Feature: Index Scope To Viewing resource configs scoped to another object Background: Given 10 posts exist And a post with the title "Hello World" written by "John Doe" exists And a published post with the title "Hello World" written by "John Doe" exists Given an index configuration of: """ ActiveAdmin.register Post do # Scope section to a specific author scope_to do User.find_by_first_name_and_last_name("John", "Doe") end # Setup some scopes scope :all, :default => true scope :published do |posts| posts.where("published_at IS NOT NULL") end end """ Scenario: Viewing the default scope counts When I am on the index page for posts Then I should see the scope "All" selected And I should see the scope "All" with the count 2 And I should see 2 posts in the table
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activeadmin-0.4.1 | features/index/index_scope_to.feature |