Sha256: 74bdde8da625abe04672e8bf919ce64e9bf02cd95d477901783f199462e755e2

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 KB

Contents

$:.unshift 'lib'
$LOAD_PATH << File.dirname(__FILE__)

require 'helper'
require 'upwork/api/routers/mc'
require 'test/unit'
require 'mocha/test_unit'

class McTest < Test::Unit::TestCase
  include TestHelper
  
  def test_get_trays
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.get_trays
  end
  
  def test_get_tray_by_type
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.get_tray_by_type('username', 'type')
  end
  
  def test_get_thread_details
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.get_thread_details('username', '12')
  end
  
  def test_get_thread_by_context
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.get_thread_by_context('username', '~key', '12')
  end
  
  def test_get_thread_by_context_last_posts
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.get_thread_by_context_last_posts('username', '~key', '12')
  end
  
  def test_start_new_thread
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.start_new_thread('username', {})
  end
  
  def test_reply_to_thread
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.reply_to_thread('username', '12', {})
  end
  
  def test_mark_thread
    api = Upwork::Api::Routers::Mc.new(get_client_mock)
    assert api.mark_thread('username', '12', {})
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
upwork-api-1.1.0 test/test_mc.rb
upwork-api-1.0.1 test/test_mc.rb
upwork-api-1.0.0 test/test_mc.rb