Blame view

test/invqry_test.rb 848 Bytes
fb410806   chadzink   Add INVQRY busine...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  # frozen_string_literal: true
  
  require 'test_helper'
  
  class InvQryTest < Minitest::Test
    extend Minitest::Spec::DSL
    before { VCR.insert_cassette name }
    after { VCR.eject_cassette }
  
    let(:username) { ENV['SYSPRO_USERNAME'] }
    let(:password) { ENV['SYSPRO_PASSWORD'] }
    let(:company) { ENV['SYSPRO_COMPANY'] }
    let(:company_password) { '' }
  
    let(:user_id) do
      Syspro::Logon.logon(username, password, company, company_password)
    end
  
    def test_int_query
      invqry_req = Syspro::BusinessObjects::InvQry.new
  
      invqry_req.key_stock_code = '1003'
      invqry_req.filter_warehouse_list = 'P0'
      invqry_req.option = Syspro::BusinessObjects::Models::InvQryOptions.new
b1c0def6   Samuel J Clopton   rubocop violation...
25
26
      invqry_req.option.include_lots = 'Y'
  
fb410806   chadzink   Add INVQRY busine...
27
28
29
30
      invqry_rsp = invqry_req.call(user_id.guid)
  
      assert_kind_of Syspro::BusinessObjects::Models::Inv, invqry_rsp
    end
b1c0def6   Samuel J Clopton   rubocop violation...
31
  end