Sha256: 46be3b8c4fad2b9e0ebfcccc9b002e023d2351ac667c42c226a155fc1dd80285

Contents?: true

Size: 402 Bytes

Versions: 11

Compression:

Stored size: 402 Bytes

Contents

require 'rails_helper'

RSpec.describe BooksController do
  describe 'routing' do

    it 'routes to #index' do
      expect(:get => '/authors/author-slug/books').to route_to('books#index', author_id: 'author-slug')
    end

    it 'routes to #show' do
      expect(:get => '/authors/author-slug/books/book-slug').to route_to('books#show', author_id: 'author-slug', id: 'book-slug')
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
friendly_id-method_scopes-0.3.7 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.3.3 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.3.2 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.3.1 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.3.0 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.2.6 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.2.5 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.1.8 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.1.7 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.1.6 spec/routing/books_routing_spec.rb
friendly_id-method_scopes-0.1.5 spec/routing/books_routing_spec.rb