test(static_controller): fix inconsistency with Settings merge
This commit is contained in:
parent
c21ddbba06
commit
b65b88b292
1 changed files with 18 additions and 11 deletions
|
@ -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
|
||||||
|
Settings.merge!(
|
||||||
|
ccs: {
|
||||||
ccs_method: 'github',
|
ccs_method: 'github',
|
||||||
options: {
|
options: {
|
||||||
account: 'account',
|
account: 'account',
|
||||||
repo: 'repo'
|
repo: 'repo'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'setup github' do
|
||||||
expect(File).to receive(:read).with("#{Rails.root}/CCS_HASH").and_return("hash\n")
|
expect(File).to receive(:read).with("#{Rails.root}/CCS_HASH").and_return("hash\n")
|
||||||
get('ccs')
|
get('ccs')
|
||||||
expect(response).to redirect_to 'https://github.com/account/repo/tree/hash'
|
expect(response).to redirect_to 'https://github.com/account/repo/tree/hash'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue