Sha256: 52d27d9a13b31f0e7c117e455e01120b3ecc7e749f919280156b658f5898d622

Contents?: true

Size: 605 Bytes

Versions: 33

Compression:

Stored size: 605 Bytes

Contents

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

module MeducationSDK
  class DashboardItemTest < ResourceTest
    test_resource(DashboardItem, '/dashboard_items')

    def test_user_calls_sdk
      dashboard_item = DashboardItem.new(user_id: 3, item_type: "MediaFile", item_id: 17)
      MeducationSDK::User.expects(:find).with(3)
      dashboard_item.user
    end

    def test_item_calls_sdk
      dashboard_item = DashboardItem.new(user_id: 3, item_type: "MediaFile", item_id: 17)
      MeducationSDK::MediaFile.expects(:find).with(17)
      dashboard_item.item
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

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