Sha256: 3bd86e35b69cae86f79544de03229bfdd0808d1ad956d0dbfe476ab0d623aeff

Contents?: true

Size: 1.73 KB

Versions: 19

Compression:

Stored size: 1.73 KB

Contents

require 'spec_helper'

describe 'generic files routing' do
  let(:parent_id) { '1a2b3c' }
  let(:child_id) { '1a2b3c4d5e' }

  it "routes GET /concern/related_files/:id" do
    expect(
      get: "/concern/generic_files/#{child_id}"
    ).to(
      route_to(
        controller: "curation_concern/generic_files",
        action: "show",
        id: child_id
      )
    )
  end

  it "routes GET /concern/related_files/:id/edit" do
    expect(
      get: "/concern/generic_files/#{child_id}/edit"
    ).to(
      route_to(
        controller: "curation_concern/generic_files",
        action: "edit",
        id: child_id
      )
    )
  end

  it "routes GET /concern/related_files/:id" do
    expect(
      put: "/concern/generic_files/#{child_id}"
    ).to(
      route_to(
        controller: "curation_concern/generic_files",
        action: "update",
        id: child_id
      )
    )
  end

  it "routes GET /concern/container/:parent_id/related_files/new" do
    expect(
      get: "/concern/container/#{parent_id}/generic_files/new"
    ).to(
      route_to(
        controller: "curation_concern/generic_files",
        action: "new",
        parent_id: parent_id
      )
    )
  end

  it "routes POST /concern/container/:parent_id/related_files" do
    expect(
      post: "/concern/container/#{parent_id}/generic_files"
    ).to(
      route_to(
        controller: "curation_concern/generic_files",
        action: "create",
        parent_id: parent_id
      )
    )
  end

  it "routes DELETE /concern/container/:parent_id/related_files" do
    expect(
      delete: "/concern/generic_files/#{child_id}"
    ).to(
      route_to(
        controller: "curation_concern/generic_files",
        action: "destroy",
        id: child_id
      )
    )
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
curate-0.6.6 spec/routing/generic_files_routing_spec.rb
curate-0.6.5 spec/routing/generic_files_routing_spec.rb
curate-0.6.4 spec/routing/generic_files_routing_spec.rb
curate-0.6.3 spec/routing/generic_files_routing_spec.rb
curate-0.6.1 spec/routing/generic_files_routing_spec.rb
curate-0.6.0 spec/routing/generic_files_routing_spec.rb
curate-0.5.6 spec/routing/generic_files_routing_spec.rb
curate-0.5.5 spec/routing/generic_files_routing_spec.rb
curate-0.5.4 spec/routing/generic_files_routing_spec.rb
curate-0.5.2 spec/routing/generic_files_routing_spec.rb
curate-0.5.1 spec/routing/generic_files_routing_spec.rb
curate-0.5.0 spec/routing/generic_files_routing_spec.rb
curate-0.4.2 spec/routing/generic_files_routing_spec.rb
curate-0.3.2 spec/routing/generic_files_routing_spec.rb
curate-0.3.1 spec/routing/generic_files_routing_spec.rb
curate-0.2.0 spec/routing/generic_files_routing_spec.rb
curate-0.1.3 spec/routing/generic_files_routing_spec.rb
curate-0.1.2 spec/routing/generic_files_routing_spec.rb
curate-0.1.1 spec/routing/generic_files_routing_spec.rb