Sha256: 5508f652f0ec5584c6375ecfa91d3aa8a768ab0070d7a11f6b2cca2664f46656

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require "spec_helper"

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

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

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

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

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

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

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

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

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

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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flyboy-1.1.0 spec/routes/flyboy/tasks_routing_spec.rb