Sha256: 0f92a5dbff1f95ca34d4c79bd340affbcbdc75fe07cfdb987fbf67a7b34e8024

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

require "minitest_helper"

describe "Application integration" do
  before do
    User.destroy_all
    @user = FactoryGirl.create(:user)
    @nonvalid_user = FactoryGirl.create(:user, :can_manage_ads => false)
  end
  it "allows a valid signed in user to go to adserver root" do
    login_as(@user, :scope => :user)
    visit '/rails_adserver/'
    page.text.must_include "Adserver"
    # The text adserver exists in the footer.
  end
  it "does not allow a non-valid signed in user to go to adserver root" do
    login_as(@nonvalid_user, :scope => :user)
    visit '/rails_adserver/'
    page.text.must_include "404"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_adserver-1.0.2 test/integration/application_test.rb