Sha256: b54ed306c637aa15a19571ba6a46251d7004e5c1fba8383226d104e786101c40

Contents?: true

Size: 531 Bytes

Versions: 26

Compression:

Stored size: 531 Bytes

Contents

require_relative '../test_helper'
require_relative '../resource_test'

module MeducationSDK
  class ViewTest < ResourceTest
    test_resource(View, '/views')

    def test_item_calls_sdk
      view = View.new(user_id: 30660, item_id: 2, item_type: "MediaFile")
      MeducationSDK::MediaFile.expects(:find).with(2)
      view.item
    end

    def test_user_calls_sdk
      view = View.new(user_id: 30660, item_id: 2, item_type: "MediaFile")
      MeducationSDK::User.expects(:find).with(30660)
      view.user
    end
  end
end


Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
meducation_sdk-2.2.2 test/resources/view_test.rb
meducation_sdk-2.2.1 test/resources/view_test.rb
meducation_sdk-2.2.0 test/resources/view_test.rb
meducation_sdk-2.1.4 test/resources/view_test.rb
meducation_sdk-2.1.3 test/resources/view_test.rb
meducation_sdk-2.1.2 test/resources/view_test.rb
meducation_sdk-2.1.1 test/resources/view_test.rb
meducation_sdk-2.1.0 test/resources/view_test.rb
meducation_sdk-2.0.5 test/resources/view_test.rb
meducation_sdk-2.0.4 test/resources/view_test.rb
meducation_sdk-2.0.3 test/resources/view_test.rb
meducation_sdk-2.0.2 test/resources/view_test.rb
meducation_sdk-2.0.1 test/resources/view_test.rb
meducation_sdk-2.0.0 test/resources/view_test.rb
meducation_sdk-1.6.16 test/resources/view_test.rb
meducation_sdk-1.6.15 test/resources/view_test.rb
meducation_sdk-1.6.14 test/resources/view_test.rb
meducation_sdk-1.6.13 test/resources/view_test.rb
meducation_sdk-1.6.12 test/resources/view_test.rb
meducation_sdk-1.6.11 test/resources/view_test.rb