mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
DRY up tests.
This commit is contained in:
parent
7f6fe8fe13
commit
48e118a054
1 changed files with 4 additions and 2 deletions
|
@ -83,8 +83,10 @@ describe DiscourseRedis do
|
||||||
begin
|
begin
|
||||||
fallback_handler.master = false
|
fallback_handler.master = false
|
||||||
Redis::Client.any_instance.expects(:call).with([:info]).returns(DiscourseRedis::FallbackHandler::MASTER_LINK_STATUS)
|
Redis::Client.any_instance.expects(:call).with([:info]).returns(DiscourseRedis::FallbackHandler::MASTER_LINK_STATUS)
|
||||||
Redis::Client.any_instance.expects(:call).with([:client, [:kill, 'type', 'normal']])
|
|
||||||
Redis::Client.any_instance.expects(:call).with([:client, [:kill, 'type', 'pubsub']])
|
%w{normal pubsub}.each do |connection_type|
|
||||||
|
Redis::Client.any_instance.expects(:call).with([:client, [:kill, 'type', connection_type]])
|
||||||
|
end
|
||||||
|
|
||||||
fallback_handler.initiate_fallback_to_master
|
fallback_handler.initiate_fallback_to_master
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue