Sha256: ee5604d038a7e7aac0118304c62f1a965d33d9c5df02902c1638740aca8dd76f

Contents?: true

Size: 1.44 KB

Versions: 5

Compression:

Stored size: 1.44 KB

Contents

require 'spec_helper_routing'

describe Gaku::Admin::SchoolYearsController do

  routes { Gaku::Core::Engine.routes }

  describe 'member' do

    it 'routes to #edit' do
      expect(get: 'admin/school_years/1/edit').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'edit',
        id: '1'
      )
    end

    it 'routes to #show' do
      expect(get: 'admin/school_years/1').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'show',
        id: '1'
      )
    end

    it 'routes to #update' do
      expect(patch: 'admin/school_years/1').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'update',
        id: '1'
      )
    end

    it 'routes to #destroy' do
      expect(delete: 'admin/school_years/1').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'destroy',
        id: '1'
      )
    end
  end

  describe 'collection' do

    it 'routes to #index' do
      expect(get: 'admin/school_years/').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'index'
      )
    end

    it 'routes to #new' do
      expect(get: 'admin/school_years/new').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'new'
      )
    end

    it 'routes to #create' do
      expect(post: 'admin/school_years').to route_to(
        controller: 'gaku/admin/school_years',
        action: 'create'
      )
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gaku-0.2.4 admin/spec/routing/admin/school_years/school_years_routing_spec.rb
gaku-0.2.3 admin/spec/routing/admin/school_years/school_years_routing_spec.rb
gaku-0.2.2 admin/spec/routing/admin/school_years/school_years_routing_spec.rb
gaku-0.2.1 admin/spec/routing/admin/school_years/school_years_routing_spec.rb
gaku-0.2.0 admin/spec/routing/admin/school_years/school_years_routing_spec.rb