Sha256: 7515cb8f9358d175e3ff856f1b9cdb6bcdfc26c42b97e425d834d30d4635bcc1

Contents?: true

Size: 1.8 KB

Versions: 3

Compression:

Stored size: 1.8 KB

Contents

require "rails_helper"

describe ::Dorsale::BillingMachine::InvoicesController, type: :routing do
  routes { ::Dorsale::Engine.routes }

  describe "routing" do
    it "#index" do
      expect(get "/billing_machine/invoices").to \
        route_to("dorsale/billing_machine/invoices#index")
    end

    it "#new" do
      expect(get "/billing_machine/invoices/new").to \
        route_to("dorsale/billing_machine/invoices#new")
    end

    it "#create" do
      expect(post "/billing_machine/invoices").to \
        route_to("dorsale/billing_machine/invoices#create")
    end

    it "#show" do
      expect(get "/billing_machine/invoices/1").to \
        route_to("dorsale/billing_machine/invoices#show", id: "1")
    end

    it "#show pdf" do
      expect(get "/billing_machine/invoices/1.pdf").to \
        route_to("dorsale/billing_machine/invoices#show", id: "1", format: "pdf")
    end

    it "#pay" do
      expect(patch "/billing_machine/invoices/1/pay").to \
        route_to("dorsale/billing_machine/invoices#pay", id: "1")
    end

    it "#copy" do
      expect(get "/billing_machine/invoices/1/copy").to \
        route_to("dorsale/billing_machine/invoices#copy", id: "1")
    end

    it "#edit" do
      expect(get "/billing_machine/invoices/1/edit").to \
        route_to("dorsale/billing_machine/invoices#edit", id: "1")
    end

    it "#update" do
      expect(patch "/billing_machine/invoices/1").to \
        route_to("dorsale/billing_machine/invoices#update", id: "1")
    end

    it "#email via GET" do
      expect(get "/billing_machine/invoices/1/email").to \
        route_to("dorsale/billing_machine/invoices#email", id: "1")
    end

    it "#email via PORT" do
      expect(post "/billing_machine/invoices/1/email").to \
        route_to("dorsale/billing_machine/invoices#email", id: "1")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dorsale-3.9.3 spec/routing/dorsale/billing_machine/invoices_routing_spec.rb
dorsale-3.9.2 spec/routing/dorsale/billing_machine/invoices_routing_spec.rb
dorsale-3.9.1 spec/routing/dorsale/billing_machine/invoices_routing_spec.rb