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-2.2.2 test/resources/board_test.rb
meducation_sdk-2.2.1 test/resources/board_test.rb
meducation_sdk-2.2.0 test/resources/board_test.rb
meducation_sdk-2.1.4 test/resources/board_test.rb
meducation_sdk-2.1.3 test/resources/board_test.rb
meducation_sdk-2.1.2 test/resources/board_test.rb
meducation_sdk-2.1.1 test/resources/board_test.rb
meducation_sdk-2.1.0 test/resources/board_test.rb
meducation_sdk-2.0.5 test/resources/board_test.rb
meducation_sdk-2.0.4 test/resources/board_test.rb
meducation_sdk-2.0.3 test/resources/board_test.rb
meducation_sdk-2.0.2 test/resources/board_test.rb
meducation_sdk-2.0.1 test/resources/board_test.rb
meducation_sdk-2.0.0 test/resources/board_test.rb
meducation_sdk-1.6.16 test/resources/board_test.rb
meducation_sdk-1.6.15 test/resources/board_test.rb
meducation_sdk-1.6.14 test/resources/board_test.rb
meducation_sdk-1.6.13 test/resources/board_test.rb
meducation_sdk-1.6.12 test/resources/board_test.rb
meducation_sdk-1.6.11 test/resources/board_test.rb