the tool consumer profile includes the service_owner object
fixes: PLAT-789 test-plan specs should pass Change-Id: I81438bbe156248d84622316f98d1e2cb81751828 Reviewed-on: https://gerrit.instructure.com/45073 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Brad Humphrey <brad@instructure.com> Product-Review: Nathan Mills <nathanm@instructure.com> QA-Review: Nathan Mills <nathanm@instructure.com>
This commit is contained in:
parent
6364bcce87
commit
5f620b114a
|
@ -83,6 +83,7 @@ module Lti
|
|||
product_instance = IMS::LTI::Models::ProductInstance.new
|
||||
product_instance.guid = @root_account.lti_guid
|
||||
product_instance.product_info = create_product_info
|
||||
product_instance.service_owner = create_service_owner
|
||||
product_instance
|
||||
end
|
||||
|
||||
|
@ -109,6 +110,13 @@ module Lti
|
|||
vendor
|
||||
end
|
||||
|
||||
def create_service_owner
|
||||
service_owner = IMS::LTI::Models::ServiceOwner.new
|
||||
service_owner.create_service_owner_name(@root_account.name)
|
||||
service_owner.create_description(@root_account.name)
|
||||
service_owner
|
||||
end
|
||||
|
||||
def services
|
||||
endpoint_slug = "#{@scheme}://#{@domain}/"
|
||||
SERVICES.map do |service|
|
||||
|
|
|
@ -3,7 +3,12 @@ require 'spec_helper'
|
|||
module Lti
|
||||
describe ToolConsumerProfileCreator do
|
||||
|
||||
let(:root_account) { mock('root account', lti_guid: 'my_guid') }
|
||||
let(:root_account) do
|
||||
mock('root account') do
|
||||
stubs(:lti_guid).returns('my_guid')
|
||||
stubs(:name).returns('root_account_name')
|
||||
end
|
||||
end
|
||||
let(:account) { mock('account', id: 3, root_account: root_account) }
|
||||
let(:tcp_url) { 'http://example.instructure.com/tcp/uuid' }
|
||||
subject { ToolConsumerProfileCreator.new(account, tcp_url) }
|
||||
|
@ -21,7 +26,12 @@ module Lti
|
|||
product_instance = subject.create.product_instance
|
||||
expect(product_instance.guid).to eq 'my_guid'
|
||||
expect(product_instance.product_info).to be_an IMS::LTI::Models::ProductInfo
|
||||
end
|
||||
|
||||
it 'creates the service owner' do
|
||||
service_owner = subject.create.product_instance.service_owner
|
||||
expect(service_owner.service_owner_name.default_value).to eq 'root_account_name'
|
||||
expect(service_owner.description.default_value).to eq 'root_account_name'
|
||||
end
|
||||
|
||||
it 'creates the product info' do
|
||||
|
|
Loading…
Reference in New Issue