Sha256: e451466186ea7c141cc1a45f7b35e313ca227e342dca7b5cdb9e8791912c11df

Contents?: true

Size: 652 Bytes

Versions: 34

Compression:

Stored size: 652 Bytes

Contents

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

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

34 entries across 34 versions & 1 rubygems

Version Path
meducation_sdk-1.6.10 test/resources/board_test.rb
meducation_sdk-1.6.6 test/resources/board_test.rb
meducation_sdk-1.6.5 test/resources/board_test.rb
meducation_sdk-1.6.4 test/resources/board_test.rb
meducation_sdk-1.6.3 test/resources/board_test.rb
meducation_sdk-1.6.2 test/resources/board_test.rb
meducation_sdk-1.6.1 test/resources/board_test.rb
meducation_sdk-1.6.0 test/resources/board_test.rb
meducation_sdk-1.5.7 test/resources/board_test.rb
meducation_sdk-1.5.6 test/resources/board_test.rb
meducation_sdk-1.5.5 test/resources/board_test.rb
meducation_sdk-1.5.4 test/resources/board_test.rb
meducation_sdk-1.5.3 test/resources/board_test.rb
meducation_sdk-1.5.2 test/resources/board_test.rb