Sha256: b1a6e18b41d995db518f72bf4c9bdcad57c3e3d3d0ef29f8ea18c53681e01dcf

Contents?: true

Size: 606 Bytes

Versions: 7

Compression:

Stored size: 606 Bytes

Contents

# -*- encoding : utf-8 -*-

# FIXME: - this shouldn't really be with the controller specs

describe CardController, 'location test from old integration' do
  routes { Decko::Engine.routes }

  before do
    login_as 'joe_user'
  end

  describe 'previous location' do
    it 'gets updated after viewing' do
      get :read, id: 'Joe_User'
      assert_equal '/Joe_User', Card::Env.previous_location
    end

    it "doesn't link to nonexistent cards" do
      get :read, id: 'Joe_User'
      get :read, id: 'Not_Me'
      get :read, id: '*previous'
      assert_redirected_to '/Joe_User'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wagn-1.18.6 spec/controllers/location_spec.rb
wagn-1.18.5 spec/controllers/location_spec.rb
wagn-1.18.4 spec/controllers/location_spec.rb
wagn-1.18.3 spec/controllers/location_spec.rb
wagn-1.18.2 spec/controllers/location_spec.rb
wagn-1.18.1 spec/controllers/location_spec.rb
wagn-1.18.0 spec/controllers/location_spec.rb