Sha256: fe145ced4cedaa14ebb4d6ed0705f8b83840f7b1d51c875cf5f9d344d41498ba

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

RSpec.describe "users router", type: :routing do
  it "should have a new session route" do
    expect(get: '/users/sign_in').to route_to(controller: 'users/sessions', action: 'new')
  end
  it "should have a new session path helper" do
    expect(get: new_user_session_path).to route_to(controller: 'users/sessions', action: 'new')
  end
  it "should have a destroy session route" do
    expect(get: '/users/sign_out').to route_to(controller: 'users/sessions', action: 'destroy')
  end
  it "should have a destroy session path helper" do
    expect(get: destroy_user_session_path).to route_to(controller: 'users/sessions', action: 'destroy')
  end
  it "should have a shibboleth authentication path" do
    expect(get: '/users/auth/shibboleth').to route_to(controller: 'users/omniauth_callbacks', action: 'passthru', provider: 'shibboleth')
  end
  it "should have a shibboleth authentication path helper" do
    expect(get: user_omniauth_authorize_path(:shibboleth)).to route_to(controller: 'users/omniauth_callbacks', action: 'passthru', provider: 'shibboleth')
  end
  describe "redirects", type: :request do
    it "should have a signed out path" do
      get '/users/signed_out'
      expect(response).to redirect_to('/')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ddr-models-1.10.0 spec/routing/user_routing_spec.rb