Blame view

test/logoff_test.rb 658 Bytes
dc8aa5b6   Joe Weakley   Rubocop corrections
1
2
3
  # frozen_string_literal: true
  
  require 'test_helper'
697a8854   Isaac Lewis   update tests
4
5
  
  class LogoffTest < Minitest::Test
dc8aa5b6   Joe Weakley   Rubocop corrections
6
    extend Minitest::Spec::DSL
f65bf747   Joe Weakley   Added and configu...
7
8
    before { VCR.insert_cassette name }
    after { VCR.eject_cassette }
dc8aa5b6   Joe Weakley   Rubocop corrections
9
  
23108441   Nathan Ockerman   Replace sensitive...
10
11
12
    let(:username) { ENV['SYSPRO_USERNAME'] }
    let(:password) { ENV['SYSPRO_PASSWORD'] }
    let(:company) { ENV['SYSPRO_COMPANY'] }
dc8aa5b6   Joe Weakley   Rubocop corrections
13
    let(:company_password) { '' }
697a8854   Isaac Lewis   update tests
14
  
dc8aa5b6   Joe Weakley   Rubocop corrections
15
    def test_successful_logoff
697a8854   Isaac Lewis   update tests
16
17
18
19
20
      uid = Syspro::Logon.logon(username, password, company, company_password)
      assert_equal true, Syspro::Logoff.logoff(uid.guid)
    end
  
    def test_logoff_error
dc8aa5b6   Joe Weakley   Rubocop corrections
21
22
23
24
      assert_kind_of(
        String,
        Syspro::Logoff.logoff('1BB5B3050954BB459A5D034DB5CC386980')
      )
697a8854   Isaac Lewis   update tests
25
26
    end
  end