Change HTTP links to HTTPS
This commit is contained in:
@ -62,7 +62,7 @@ describe Lti do
|
||||
|
||||
describe '#return_to_consumer' do
|
||||
context 'with a return URL' do
|
||||
let(:consumer_return_url) { 'http://example.org' }
|
||||
let(:consumer_return_url) { 'https://example.org' }
|
||||
|
||||
before { allow(controller).to receive(:params).and_return(launch_presentation_return_url: consumer_return_url) }
|
||||
|
||||
|
@ -6,7 +6,7 @@ describe CodeharborLinksController do
|
||||
let(:user) { create(:teacher) }
|
||||
|
||||
let(:codeocean_config) { instance_double(CodeOcean::Config) }
|
||||
let(:codeharbor_config) { {codeharbor: {enabled: true, url: 'http://test.url'}} }
|
||||
let(:codeharbor_config) { {codeharbor: {enabled: true, url: 'https://test.url'}} }
|
||||
|
||||
before do
|
||||
allow(CodeOcean::Config).to receive(:new).with(:code_ocean).and_return(codeocean_config)
|
||||
@ -32,7 +32,7 @@ describe CodeharborLinksController do
|
||||
|
||||
describe 'POST #create' do
|
||||
let(:post_request) { post :create, params: {codeharbor_link: params} }
|
||||
let(:params) { {push_url: 'http://foo.bar/push', check_uuid_url: 'http://foo.bar/check', api_key: 'api_key'} }
|
||||
let(:params) { {push_url: 'https://foo.bar/push', check_uuid_url: 'https://foo.bar/check', api_key: 'api_key'} }
|
||||
|
||||
it 'creates a codeharbor_link' do
|
||||
expect { post_request }.to change(CodeharborLink, :count).by(1)
|
||||
@ -59,14 +59,14 @@ describe CodeharborLinksController do
|
||||
describe 'PUT #update' do
|
||||
let(:codeharbor_link) { create(:codeharbor_link, user: user) }
|
||||
let(:put_request) { patch :update, params: {id: codeharbor_link.id, codeharbor_link: params} }
|
||||
let(:params) { {push_url: 'http://foo.bar/push', check_uuid_url: 'http://foo.bar/check', api_key: 'api_key'} }
|
||||
let(:params) { {push_url: 'https://foo.bar/push', check_uuid_url: 'https://foo.bar/check', api_key: 'api_key'} }
|
||||
|
||||
it 'updates push_url' do
|
||||
expect { put_request }.to change { codeharbor_link.reload.push_url }.to('http://foo.bar/push')
|
||||
expect { put_request }.to change { codeharbor_link.reload.push_url }.to('https://foo.bar/push')
|
||||
end
|
||||
|
||||
it 'updates check_uuid_url' do
|
||||
expect { put_request }.to change { codeharbor_link.reload.check_uuid_url }.to('http://foo.bar/check')
|
||||
expect { put_request }.to change { codeharbor_link.reload.check_uuid_url }.to('https://foo.bar/check')
|
||||
end
|
||||
|
||||
it 'updates api_key' do
|
||||
|
@ -3,8 +3,8 @@
|
||||
FactoryBot.define do
|
||||
factory :codeharbor_link do
|
||||
user { build(:teacher) }
|
||||
push_url { 'http://push.url' }
|
||||
check_uuid_url { 'http://check-uuid.url' }
|
||||
push_url { 'https://push.url' }
|
||||
check_uuid_url { 'https://check-uuid.url' }
|
||||
sequence(:api_key) {|n| "api_key#{n}" }
|
||||
end
|
||||
end
|
||||
|
@ -3,8 +3,8 @@
|
||||
FactoryBot.define do
|
||||
lti_params = {
|
||||
lis_result_sourcedid: 'c2db0c7c-4411-4b27-a52b-ddfc3dc32065',
|
||||
lis_outcome_service_url: 'http://172.16.54.235:3000/courses/0132156a-9afb-434d-83cc-704780104105/sections/21c6c6f4-1fb6-43b4-af3c-04fdc098879e/items/999b1fe6-d4b6-47b7-a577-ea2b4b1041ec/tool_grading',
|
||||
launch_presentation_return_url: 'http://172.16.54.235:3000/courses/0132156a-9afb-434d-83cc-704780104105/sections/21c6c6f4-1fb6-43b4-af3c-04fdc098879e/items/999b1fe6-d4b6-47b7-a577-ea2b4b1041ec/tool_return',
|
||||
lis_outcome_service_url: 'https://172.16.54.235:3000/courses/0132156a-9afb-434d-83cc-704780104105/sections/21c6c6f4-1fb6-43b4-af3c-04fdc098879e/items/999b1fe6-d4b6-47b7-a577-ea2b4b1041ec/tool_grading',
|
||||
launch_presentation_return_url: 'https://172.16.54.235:3000/courses/0132156a-9afb-434d-83cc-704780104105/sections/21c6c6f4-1fb6-43b4-af3c-04fdc098879e/items/999b1fe6-d4b6-47b7-a577-ea2b4b1041ec/tool_return',
|
||||
}.freeze
|
||||
|
||||
factory :lti_parameter do
|
||||
|
@ -7,7 +7,7 @@ describe Runner::Strategy::DockerContainerPool do
|
||||
let(:runner_id) { attributes_for(:runner)[:runner_id] }
|
||||
let(:execution_environment) { create :ruby }
|
||||
let(:container_pool) { described_class.new(runner_id, execution_environment) }
|
||||
let(:docker_container_pool_url) { 'http://localhost:1234' }
|
||||
let(:docker_container_pool_url) { 'https://localhost:1234' }
|
||||
let(:config) { {url: docker_container_pool_url, unused_runner_expiration_time: 180} }
|
||||
let(:container) { instance_double(Docker::Container) }
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
# The `.rspec` file also contains a few flags that are not defaults but that
|
||||
# users commonly want.
|
||||
#
|
||||
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
||||
# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
||||
|
||||
unless RUBY_PLATFORM == 'java'
|
||||
require 'simplecov'
|
||||
@ -65,7 +65,7 @@ RSpec.configure do |config|
|
||||
config.expect_with :rspec do |expectations|
|
||||
# Enable only the newer, non-monkey-patching expect syntax.
|
||||
# For more details, see:
|
||||
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
||||
# - https://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
||||
expectations.syntax = :expect
|
||||
end
|
||||
|
||||
@ -73,8 +73,6 @@ RSpec.configure do |config|
|
||||
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
||||
config.mock_with :rspec do |mocks|
|
||||
# Enable only the newer, non-monkey-patching expect syntax.
|
||||
# For more details, see:
|
||||
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
||||
mocks.syntax = :expect
|
||||
|
||||
# Prevents you from mocking or stubbing a method that does not exist on
|
||||
|
Reference in New Issue
Block a user