Sha256: 531af939aacca528ef6f51da0e3bc7e1c98239cf82628526cce0955f889049cf

Contents?: true

Size: 924 Bytes

Versions: 32

Compression:

Stored size: 924 Bytes

Contents

require 'test_helper'

class AdminDashboardTest < ActionDispatch::IntegrationTest

  setup do
    login_admin_user
  end

  test "should be able to get to flagged image from dashboard" do
    within "#recently_flagged" do
      all('a').first.click
    end
    assert page.has_content?('Image Details')
  end

  # FIXME: for these blank slate tests there is probably a better way to just not load these in the first place.
  test "should see blank slates when there are no images" do
    Lentil::Image.all.each{|image| image.destroy}
    visit admin_dashboard_path
    assert page.has_content?('No New Images')
    assert page.has_content?('No Recently Flagged Images')
    assert page.has_content?('No Top Images Found')
  end

  test "should see blank slate when there are no users" do
    Lentil::User.all.each{|user| user.destroy}
    visit admin_dashboard_path
    assert page.has_content?('No Users Found')
  end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
lentil-1.0.5 test/integration/lentil/admin_dashboard_test.rb
lentil-1.0.4 test/integration/lentil/admin_dashboard_test.rb
lentil-1.0.3 test/integration/lentil/admin_dashboard_test.rb
lentil-1.0.2 test/integration/lentil/admin_dashboard_test.rb
lentil-1.0.1 test/integration/lentil/admin_dashboard_test.rb
lentil-1.0.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.9.1 test/integration/lentil/admin_dashboard_test.rb
lentil-0.9.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.8.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.7.1 test/integration/lentil/admin_dashboard_test.rb
lentil-0.6.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.5.2 test/integration/lentil/admin_dashboard_test.rb
lentil-0.5.1 test/integration/lentil/admin_dashboard_test.rb
lentil-0.5.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.4.2 test/integration/lentil/admin_dashboard_test.rb
lentil-0.4.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.3.1 test/integration/lentil/admin_dashboard_test.rb
lentil-0.3.0 test/integration/lentil/admin_dashboard_test.rb
lentil-0.2.3 test/integration/lentil/admin_dashboard_test.rb
lentil-0.2.2 test/integration/lentil/admin_dashboard_test.rb