Commit 931eadaa authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix-failing-tests' into 'master'

This fixes a long running tests due to changed Sidekiq state

## What does this MR do?
Fixes a ordering of tests problem, where GroupsController tests change global state and this affects IrkerService

cc @connorshea 

See merge request !5819
parents a669bdb8 cd8ba09e
......@@ -7,12 +7,13 @@
before do
sign_in(admin)
Sidekiq::Testing.fake!
end
describe 'DELETE #destroy' do
it 'schedules a group destroy' do
expect { delete :destroy, id: project.group.path }.to change(GroupDestroyWorker.jobs, :size).by(1)
Sidekiq::Testing.fake! do
expect { delete :destroy, id: project.group.path }.to change(GroupDestroyWorker.jobs, :size).by(1)
end
end
it 'redirects to the admin group path' do
......
......@@ -89,12 +89,13 @@
context 'as the group owner' do
before do
Sidekiq::Testing.fake!
sign_in(user)
end
it 'schedules a group destroy' do
expect { delete :destroy, id: group.path }.to change(GroupDestroyWorker.jobs, :size).by(1)
Sidekiq::Testing.fake! do
expect { delete :destroy, id: group.path }.to change(GroupDestroyWorker.jobs, :size).by(1)
end
end
it 'redirects to the root path' do
......
......@@ -52,19 +52,20 @@
let(:colorize_messages) { '1' }
before do
@irker_server = TCPServer.new 'localhost', 0
allow(irker).to receive_messages(
active: true,
project: project,
project_id: project.id,
service_hook: true,
server_host: 'localhost',
server_port: 6659,
server_host: @irker_server.addr[2],
server_port: @irker_server.addr[1],
default_irc_uri: 'irc://chat.freenode.net/',
recipients: recipients,
colorize_messages: colorize_messages)
irker.valid?
@irker_server = TCPServer.new 'localhost', 6659
end
after do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment