Sha256: 14e7104bb22fa9715364df9f63e175d2f7a8f5ca0ef3121d19c7f6692875190c

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)
require File.expand_path('../../resource_test', __FILE__)

module MeducationSDK
  class BoardTest < ResourceTest
    test_resource(Board, '/boards')

    def test_owner_calls_sdk
      board = Board.new(owner_id: 2, owner_type: "Group")
      MeducationSDK::Group.expects(:find).with(2)
      board.owner
    end

    def test_created_by_calls_sdk
      board = Board.new(created_by_id: 2)
      MeducationSDK::User.expects(:find).with(2)
      board.created_by
    end

    def test_items_calls_sdk
      board = Board.new(id: 54)
      MeducationSDK::BoardItem.expects(:where).with(board_id: board.id)
      board.items
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
meducation_sdk-1.5.1 test/resources/board_test.rb