Sha256: 57df63b38187afc04846206a4ef09be80da0fd2716797f61ced80fad065134c5

Contents?: true

Size: 746 Bytes

Versions: 4

Compression:

Stored size: 746 Bytes

Contents

require "spec_helper"

describe "navigation", :js => true do
  describe "flash with notice" do
    it do
      notice = "This is a notice."
      visit "/?notice=#{ERB::Util.url_encode notice}"
      page.should have_css(".humane-info")
      page.should have_content(notice)
    end
  end

  describe "flash with error" do
    it do
      error = "This is an error."
      visit "/?error=#{ERB::Util.url_encode error}"
      page.should have_css(".humane-error")
      page.should have_content(error)
    end
  end

  describe "flash with alert" do
    it do
      alert = "This is an alert."
      visit "/?alert=#{ERB::Util.url_encode alert}"
      page.should have_css(".humane-error")
      page.should have_content(alert)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
humane-rails-5.1.0 spec/requests/navigation_spec.rb
humane-rails-5.0.2 spec/requests/navigation_spec.rb
humane-rails-5.0.1 spec/requests/navigation_spec.rb
humane-rails-5.0.0 spec/requests/navigation_spec.rb