Blame view

test/por_test.rb 1.67 KB
810ca84b   Isaac Lewis   wip purchase orde...
1
2
3
4
5
6
7
  require 'test_helper'
  
  class PorTest < Minitest::Test
    extend Minitest::Spec::DSL
    before { VCR.insert_cassette name }
    after { VCR.eject_cassette }
  
6f37c7e8   Nathan-O   changed login cre...
8
9
    let(:username) { 'wland' }  
    let(:password) { 'Piperita2018' }
810ca84b   Isaac Lewis   wip purchase orde...
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    let(:company) { 'L' }
    let(:company_password) { '' }
    let(:user_id) do
      Syspro::Logon.logon(username, password, company, company_password)
    end
  
    #def test_por_transaction
      #portor = Syspro::BusinessObjects::PorTor.new
  
      #portor.transaction_date = "2006-04-08"
      #portor.ignore_warnings = "N"
      #portor.grn_matching_action = "A"
      #portor.allow_blank_supplier = "N"
      #portor.apply_if_entire_document_valid = "Y"
      #portor.validate_only = "N"
      #portor.manual_serial_transfers_allowed = "N"
      #portor.ignore_analysis = "Y"
  
      #por_result = portor.call(user_id.guid)
      #assert_kind_of Syspro::BusinessObjects::Models::Por
    #end
  
    def test_por_query
      porqry = Syspro::BusinessObjects::PorQry.new
  
      porqry.purchase_order = " 00001"
      porqry.include_stocked_lines = false
      porqry.include_non_stocked_lines = false
      porqry.include_freight_lines = false
      porqry.include_miscellaneous_lines = false
      porqry.include_comment_lines = false
      porqry.include_completed_lines = false
      porqry.include_grns = false
      porqry.include_history = false
      porqry.include_lct_details = false
      porqry.include_requisition_details = false
      porqry.include_requisition_routing = false
      porqry.include_sales_orders = false
      porqry.include_custom_forms = false
      porqry.filter_type = "A"
      porqry.filter_value = ""
  
      por_result = porqry.call(user_id.guid)
0e38c117   Chad Zink   Finished POR pars...
53
      assert_kind_of(Syspro::BusinessObjects::Models::PorDetail, por_result)
810ca84b   Isaac Lewis   wip purchase orde...
54
55
    end
  end