Sha256: 7a88627c2a53aa2c6e39d82688ce60f54747ee4ffed30b181b35c20e502c2bed

Contents?: true

Size: 456 Bytes

Versions: 7

Compression:

Stored size: 456 Bytes

Contents

require 'helper'
require 'fixtures/warden_app/app'

class TestWardenPlugin < Test::Unit::TestCase
  def app
    WardenDemo.tap { |app| app.set :environment, :test }
  end
  
  context 'for authenticate_user! helper' do
    setup do
      visit '/login', :post, :username => 'john21', :password => 'secret'
      visit '/current_user'
    end
    should "return name of logged_in user" do
      assert_have_selector :h1, :content => "John"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sinatra_more-0.0.14 test/test_warden_plugin.rb
sinatra_more-0.0.13 test/test_warden_plugin.rb
sinatra_more-0.0.11 test/test_warden_plugin.rb
sinatra_more-0.0.10 test/test_warden_plugin.rb
sinatra_more-0.0.9 test/test_warden_plugin.rb
sinatra_more-0.0.8 test/test_warden_plugin.rb
sinatra_more-0.0.7 test/test_warden_plugin.rb