Blame view

test/logoff_test.rb 617 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
10
  
    let(:username) { 'wland' }
6f37c7e8   Nathan-O   changed login cre...
11
    let(:password) { 'Piperita2018' }
dc8aa5b6   Joe Weakley   Rubocop corrections
12
13
    let(:company) { 'L' }
    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