Sha256: 0fb942dc779dc0916190ebacdbc3d2529613a0cead0075153e8811598e2e8d42

Contents?: true

Size: 643 Bytes

Versions: 34

Compression:

Stored size: 643 Bytes

Contents

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

module MeducationSDK
  class BoardItemTest < ResourceTest
    test_resource(BoardItem, '/board_items')

    def test_owner_calls_sdk
      item = BoardItem.new(item_id: 2, item_type: "MediaFile")
      MeducationSDK::MediaFile.expects(:find).with(2)
      item.item
    end

    def test_user_calls_sdk
      item = BoardItem.new(user_id: 2)
      MeducationSDK::User.expects(:find).with(2)
      item.user
    end

    def test_board_calls_sdk
      item = BoardItem.new(board_id: 2)
      MeducationSDK::Board.expects(:find).with(2)
      item.board
    end

  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

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