test(static_controller): fix inconsistency with Settings merge

This commit is contained in:
Luis Castro 2019-08-02 18:46:09 +02:00
parent c21ddbba06
commit b65b88b292
No known key found for this signature in database
GPG key ID: 0A8F33D4C4E27639

View file

@ -26,17 +26,24 @@ RSpec.describe StaticController, type: :controller do
end end
end end
it 'setup github' do describe 'github' do
Settings[:ccs] = { before (:each) do
ccs_method: 'github', Settings.merge!(
options: { ccs: {
account: 'account', ccs_method: 'github',
repo: 'repo' options: {
} account: 'account',
} repo: 'repo'
expect(File).to receive(:read).with("#{Rails.root}/CCS_HASH").and_return("hash\n") }
get('ccs') }
expect(response).to redirect_to 'https://github.com/account/repo/tree/hash' )
end
it 'setup github' do
expect(File).to receive(:read).with("#{Rails.root}/CCS_HASH").and_return("hash\n")
get('ccs')
expect(response).to redirect_to 'https://github.com/account/repo/tree/hash'
end
end end
end end
end end