Sha256: 8d81554a295671e5a2ded567a80c4c60305ddd2c1ed38a01069e3c315d4fe266

Contents?: true

Size: 562 Bytes

Versions: 15

Compression:

Stored size: 562 Bytes

Contents

require 'rails_helper'

RSpec.describe SetupController, :type => :controller do
  it "should return setup information for local requests" do
    get :index
    expect(response).to render_template( :index )
  end

  it "should redirect to root url for non-local requests" do
    @request.remote_addr = "1.1.1.1"
    prev = Rails.configuration.consider_all_requests_local
    Rails.configuration.consider_all_requests_local = false
    get :index
    expect(response).to redirect_to( root_url )
    Rails.configuration.consider_all_requests_local = prev
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
happy_seed-0.0.21 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.19 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.18 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.17 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.16 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.15 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.14 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.13 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.12 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.11 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.10 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.9 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.8 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.7 lib/generators/happy_seed/base/templates/spec/controllers/setup_controller_spec.rb
happy_seed-0.0.6 lib/generators/happy_seed/foreman/templates/spec/controllers/setup_controller_spec.rb