features/index/index_scope_to.feature in activeadmin-0.6.0 vs features/index/index_scope_to.feature in activeadmin-0.6.1

- old
+ new

@@ -28,5 +28,29 @@ And I should see the scope "All" with the count 2 And I should see 2 posts in the table When I follow "Published" Then I should see 1 posts in the table + + Scenario: Viewing the index with conditional scope :if + Given an index configuration of: + """ + ActiveAdmin.register Post do + scope_to :if => proc{ false } do + User.find_by_first_name_and_last_name("John", "Doe") + end + end + """ + When I am on the index page for posts + Then I should see 12 posts in the table + + Scenario: Viewing the index with conditional scope :unless + Given an index configuration of: + """ + ActiveAdmin.register Post do + scope_to :unless => proc{ true } do + User.find_by_first_name_and_last_name("John", "Doe") + end + end + """ + When I am on the index page for posts + Then I should see 12 posts in the table