mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-19 00:30:12 +01:00
20 lines
503 B
Ruby
20 lines
503 B
Ruby
|
|
require File.dirname(__FILE__) + '/test_helper'
|
||
|
|
require 'mocha'
|
||
|
|
require 'controllers/switch_environment_controller'
|
||
|
|
|
||
|
|
class SwitchEnvironmentControllerTest < Test::Unit::TestCase
|
||
|
|
|
||
|
|
def setup
|
||
|
|
@config = mock()
|
||
|
|
setup_controller_test(SwitchEnvironmentController)
|
||
|
|
end
|
||
|
|
|
||
|
|
def test_index
|
||
|
|
SeleniumOnRailsConfig.expects(:new).returns(@config)
|
||
|
|
@config.expects(:get).with(:environments).returns("hello dolly")
|
||
|
|
|
||
|
|
get :index
|
||
|
|
|
||
|
|
assert @response.body.include?('hello dolly')
|
||
|
|
end
|
||
|
|
end
|