Sha256: ce43a8d6fa2cd1e75918270ccd7309d52af9e9ef7217b9d8d644b1c14f9290f7

Contents?: true

Size: 925 Bytes

Versions: 12

Compression:

Stored size: 925 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../test_helper' )

module IntegrationTests
  class AdminFilteringArticlesTest < ActionController::IntegrationTest
    def setup
      super
      @section = Page.find_by_title 'a page'
      @site = @section.site
      use_site! @site
    end
    
    test "Admin filters articles list with unpublished flag" do
      login_as_admin
      visit_admin_articles_index_page
      filter_articles_with_state_unpublished
    end
    
    def visit_admin_articles_index_page
      visit "/admin/sites/#{@site.id}/sections/#{@section.id}/articles"
    end
    
    def filter_articles_with_state_unpublished
      select 'state', :from => "selected_filter_0"
      check  'filter_state_unpublished_0'
      click_button 'Apply'
      
      assert_select 'td[class=article]' do
        assert_select 'a[class=pending]', 'an unpublished page article'
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
adva-0.2.4 test/integration/admin/filtering_articles_test.rb
adva-0.2.3 test/integration/admin/filtering_articles_test.rb
adva-0.2.2 test/integration/admin/filtering_articles_test.rb
adva-0.2.1 test/integration/admin/filtering_articles_test.rb
adva-0.2.0 test/integration/admin/filtering_articles_test.rb
adva-0.1.4 test/integration/admin/filtering_articles_test.rb
adva-0.1.3 test/integration/admin/filtering_articles_test.rb
adva-0.1.2 test/integration/admin/filtering_articles_test.rb
adva-0.1.1 test/integration/admin/filtering_articles_test.rb
adva-0.1.0 test/integration/admin/filtering_articles_test.rb
adva_cms-0.0.1 test/integration/admin/filtering_articles_test.rb
adva-0.0.1 adva_cms/test/integration/admin/filtering_articles_test.rb