Fix lti-advantage gem specs and change activemodel version

Test Plan:
verify lti-advantage gem specs pass locally and
on Jenkins.

Change-Id: I8707914ec5dff77b275ddc92c951e8a865925ba5
Reviewed-on: https://gerrit.instructure.com/160124
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
wdransfield 2018-08-08 12:07:14 -06:00 committed by Cody Cutrer
parent eea009d582
commit 6c699514e1
4 changed files with 10 additions and 4 deletions

View File

@ -31,6 +31,7 @@ module LtiAdvantage::Messages
}.freeze
attr_accessor *REQUIRED_CLAIMS
attr_accessor *TYPED_ATTRIBUTES.keys
attr_accessor :address,
:birthdate,
:custom,

View File

@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.add_runtime_dependency 'json-jwt', '~> 1.5'
spec.add_runtime_dependency "activemodel", "~> 5.1.6"
spec.add_runtime_dependency "activemodel", "~> 5.1"
spec.add_development_dependency "redcarpet"
spec.add_development_dependency "bundler", "~> 1.16"

View File

@ -72,9 +72,9 @@ module LtiAdvantage::Messages
context: LtiAdvantage::Claims::Context.new
)
message.validate
expect(message.errors.messages[:context]).to match_array [
{ id: ["can't be blank"] }
]
expect(message.errors.messages[:context].first.messages).to eq(
{:id => ["can't be blank"]}
)
end
it 'verifies that "aud" is an array' do

5
gems/lti-advantage/test.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e
bundle check || bundle install
bundle exec rspec spec