Sha256: 77d03f456ae4c1dca4de284c56fa94a713d53acd59ee3a97586a42febe9ce942

Contents?: true

Size: 623 Bytes

Versions: 12

Compression:

Stored size: 623 Bytes

Contents

require 'test_helper'

module Guts
  class ApplicationControllerWithMultisiteTest < ActionController::TestCase
    setup do
      @controller = Guts::UsersController.new
      @routes     = Engine.routes
    end
    
    test 'should set current site and current site should be nil' do
      get :index
      assert_equal nil, assigns('current_site')
    end

    test 'should set current site with actual site' do
      @request.host = 'fr.testsite.com'
      get :index
      
      assert_instance_of Guts::Site, assigns('current_site')
      assert_equal @request.host, assigns('current_site').domain
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
guts-1.3.6 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.3.5 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.3.4 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.3.3 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.3.2 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.3.1 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.3.0 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.2.2 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.2.1 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.2.0 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.1.1 test/controllers/guts/application_controller_with_multisite_test.rb
guts-1.1.0 test/controllers/guts/application_controller_with_multisite_test.rb