Sha256: fb6bb5eb72dd56c07af7b9af72befc783885effafcebcdc27d6fb64b86d0a27a

Contents?: true

Size: 654 Bytes

Versions: 7

Compression:

Stored size: 654 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, params: { id: "Joe_User" }
      assert_equal "/Joe_User", Card::Env.previous_location
    end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decko-0.3.3 spec/controllers/location_spec.rb
decko-0.3.2 spec/controllers/location_spec.rb
decko-0.3.1 spec/controllers/location_spec.rb
decko-0.3.0 spec/controllers/location_spec.rb
decko-0.2.2 spec/controllers/location_spec.rb
decko-0.2.1 spec/controllers/location_spec.rb
decko-0.2 spec/controllers/location_spec.rb