Sha256: 3f2cc47e5a1dc2de3a25d58cbe0b606c2216738815650b0130bd20f5a19cc98a

Contents?: true

Size: 1.21 KB

Versions: 14

Compression:

Stored size: 1.21 KB

Contents

require "spec_helper"

describe Flyboy::GoalsController, type: :routing do
  describe "routing" do
    routes { Flyboy::Engine.routes }

    it "routes to #index" do
      get("/goals").should route_to("flyboy/goals#index")
    end

    it "routes to #new" do
      get("/goals/new").should route_to("flyboy/goals#new")
    end

    it "routes to #show" do
      get("/goals/1").should route_to("flyboy/goals#show", :id => "1")
    end

    it "routes to #edit" do
      get("/goals/1/edit").should route_to("flyboy/goals#edit", :id => "1")
    end

    it "routes to #create" do
      post("/goals").should route_to("flyboy/goals#create")
    end

    it "routes to #update" do
      patch("/goals/1").should route_to("flyboy/goals#update", :id => "1")
    end

    it "routes to #destroy" do
      delete("/goals/1").should route_to("flyboy/goals#destroy", :id => "1")
    end

    it "routes to a new task" do
      get("/goals/1/tasks/new").should route_to("flyboy/tasks#new", goal_id: "1")
    end

    it "routes to #open" do
      patch("/goals/1/open").should route_to("flyboy/goals#open", id: "1")
    end

    it "routes to #close" do
      patch("/goals/1/close").should route_to("flyboy/goals#close", id: "1")
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
flyboy-1.0.7 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.6 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.5 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.4 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.3 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.2 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.1 spec/routes/flyboy/goals_routing_spec.rb
flyboy-1.0.0 spec/routes/flyboy/goals_routing_spec.rb
flyboy-0.0.6 spec/routes/flyboy/goals_routing_spec.rb
flyboy-0.0.5 spec/routes/flyboy/goals_routing_spec.rb
flyboy-0.0.4 spec/routes/flyboy/goals_routing_spec.rb
flyboy-0.0.3 spec/routes/flyboy/goals_routing_spec.rb
flyboy-0.0.2 spec/routes/flyboy/goals_routing_spec.rb
flyboy-0.0.1 spec/routes/flyboy/goals_routing_spec.rb