Sha256: e560be6894a0e4daeb64fec9850129aa6c116dffc3248b8c889b403f612f79e6

Contents?: true

Size: 596 Bytes

Versions: 6

Compression:

Stored size: 596 Bytes

Contents

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

module MeducationSDK
  class PremiumTutorialTest < ResourceTest
    test_resource(PremiumTutorial, '/premium_tutorials')

    def test_user_calls_sdk
      tutorial = PremiumTutorial.new(id: 2, user_id: 5)
      MeducationSDK::User.expects(:find).with(5)
      tutorial.user
    end

    def test_comments_calls_sdk
      tutorial = PremiumTutorial.new(comment_ids: [7,8,9])
      MeducationSDK::Comment.expects(:where).with(id: [7,8,9])
      tutorial.comments
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
meducation_sdk-1.1.2 test/resources/premium_tutorial_test.rb
meducation_sdk-1.1.1 test/resources/premium_tutorial_test.rb
meducation_sdk-1.1.0 test/resources/premium_tutorial_test.rb
meducation_sdk-1.0.0 test/resources/premium_tutorial_test.rb
meducation_sdk-0.10.1 test/resources/premium_tutorial_test.rb
meducation_sdk-0.10.0 test/resources/premium_tutorial_test.rb