Sha256: 845e17ea5e83416c00c01586888b6ddb5eeb055151429874e4a9b3dae7b8feec

Contents?: true

Size: 497 Bytes

Versions: 34

Compression:

Stored size: 497 Bytes

Contents

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

module MeducationSDK
  class CommentTest < ResourceTest
    test_resource(Comment, '/comments')

    def test_item_calls_sdk
      comment = Comment.new(item_id: 2, item_type: "MediaFile")
      MeducationSDK::MediaFile.expects(:find).with(2)
      comment.item
    end

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

Version data entries

34 entries across 34 versions & 1 rubygems

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