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-1.6.10 test/resources/comment_test.rb
meducation_sdk-1.6.6 test/resources/comment_test.rb
meducation_sdk-1.6.5 test/resources/comment_test.rb
meducation_sdk-1.6.4 test/resources/comment_test.rb
meducation_sdk-1.6.3 test/resources/comment_test.rb
meducation_sdk-1.6.2 test/resources/comment_test.rb
meducation_sdk-1.6.1 test/resources/comment_test.rb
meducation_sdk-1.6.0 test/resources/comment_test.rb
meducation_sdk-1.5.7 test/resources/comment_test.rb
meducation_sdk-1.5.6 test/resources/comment_test.rb
meducation_sdk-1.5.5 test/resources/comment_test.rb
meducation_sdk-1.5.4 test/resources/comment_test.rb
meducation_sdk-1.5.3 test/resources/comment_test.rb
meducation_sdk-1.5.2 test/resources/comment_test.rb