Sha256: e17e9b9192b0e02c35d42434d8db75c37d0a53bb02c911035c349dbf4b6615c2

Contents?: true

Size: 638 Bytes

Versions: 20

Compression:

Stored size: 638 Bytes

Contents

require 'rails_helper'

RSpec.describe Nyauth::Configuration do
  describe '#configure' do
    let(:redirect_path_after_sign_in) { '/posts' }
    before do
      # applicationの
      # config/initializers/nyauth.rb
      Nyauth.configure do |config|
        config.redirect_path do |urls|
          config.redirect_path_after_sign_in = redirect_path_after_sign_in
        end
      end
      # nyauthの
      # config/rotues.rbから呼ばれる
      Nyauth.configuration.setup_redirect_path
    end

    subject { Nyauth.configuration.redirect_path_after_sign_in }

    it { is_expected.to eq redirect_path_after_sign_in }
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nyauth-0.7.2 spec/lib/nyauth/configuration_spec.rb
nyauth-0.7.1 spec/lib/nyauth/configuration_spec.rb
nyauth-0.7.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.6.2 spec/lib/nyauth/configuration_spec.rb
nyauth-0.6.1 spec/lib/nyauth/configuration_spec.rb
nyauth-0.6.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.5.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.4.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.3.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.8 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.7 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.6 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.5 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.4 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.3 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.2 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.1 spec/lib/nyauth/configuration_spec.rb
nyauth-0.2.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.1.0 spec/lib/nyauth/configuration_spec.rb
nyauth-0.0.3 spec/lib/nyauth/configuration_spec.rb