Sha256: bf33575659619e624a4d0ec794980c3302d3ac11e87bf55f8bf9b75ef8b02bf7

Contents?: true

Size: 803 Bytes

Versions: 9

Compression:

Stored size: 803 Bytes

Contents

require "rails_helper"

RSpec.describe Newsletter::PiecesController, :type => :routing do
  describe "routing" do
    routes {Newsletter::Engine.routes}

    it "routes to #new" do
      expect(:get => "/newsletters/2/pieces/new").to route_to("newsletter/pieces#new", :newsletter_id => "2")
    end

    it "routes to #edit" do
      expect(:get => "/pieces/1/edit").to route_to("newsletter/pieces#edit", :id => "1")
    end

    it "routes to #create" do
      expect(:post => "/pieces").to route_to("newsletter/pieces#create")
    end

    it "routes to #update" do
      expect(:put => "/pieces/1").to route_to("newsletter/pieces#update", :id => "1")
    end

    it "routes to #destroy" do
      expect(:delete => "/pieces/1").to route_to("newsletter/pieces#destroy", :id => "1")
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
newsletter-3.2.25.1 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.22.0 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.7 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.6 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.5 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.4 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.2 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.1 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb
newsletter-3.2.0 spec/test_app/spec/routing/newsletter/pieces_routing_spec.rb