Skip to content

Commit

Permalink
Clean up tests and add more elixir versions to CI (#16)
Browse files Browse the repository at this point in the history
* cleanup test cases

* update CI to handle more elixir versions

* Update CHANGELOG.md

* include minor OTP versions
  • Loading branch information
jjcarstens authored Oct 13, 2018
1 parent eb5a6b4 commit d4aa99d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ matrix:
elixir: 1.3.4
- otp_release: 19.3
elixir: 1.4.2
- otp_release: 20.0
elixir: 1.5.3
- otp_release: 21.0
elixir: 1.6.6
- otp_release: 21.0
elixir: 1.7.3

sudo: false
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.2.5](https://github.com/jjcarstens/ofex/compare/v0.2.4...v0.2.5) - 2018-10-12
### Added
* Support parsing multiple accounts within single file. (thanks @nikhilmore54 !)

This comment has been minimized.

Copy link
@nikhilmore54-zz

nikhilmore54-zz Mar 19, 2019

Contributor

Thank you for the merge

* Update CI to test more elixir versions

## [0.2.4](https://github.com/jjcarstens/ofex/compare/v0.2.3...v0.2.4) - 2018-09-17
### Added
* Filters file for unsafe & (ampersand) and replaces with `&` escape
Expand Down
2 changes: 1 addition & 1 deletion test/credit_card_account_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ defmodule Ofex.CreditCardAccountTest do
}
]

assert transactions1 = [
assert transactions1 == [
%{
amount: 105.51,
check_number: nil,
Expand Down
10 changes: 6 additions & 4 deletions test/ofex_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,24 @@ defmodule OfexTest do

test "can parse data with missing closing tags" do
ofx_raw = File.read!("test/fixtures/missing_closing_tags.ofx")
{:ok, %{signon: _signon}} = Ofex.parse(ofx_raw)
assert {:ok, %{signon: _signon}} = Ofex.parse(ofx_raw)
end

test "can parse! data with missing closing tags" do
ofx_raw = File.read!("test/fixtures/missing_closing_tags.ofx")
%{signon: _signon} = Ofex.parse!(ofx_raw)
assert %{signon: _signon} = Ofex.parse!(ofx_raw)
end

test "can parse QFX data" do
ofx_raw = File.read!("test/fixtures/multiple_accounts.ofx")
{:ok, %{accounts: [_bank_account1, _bank_account2, _cc_account]}} = Ofex.parse(ofx_raw)
{:ok, %{accounts: accounts}} = Ofex.parse(ofx_raw)
assert length(accounts) == 3
end

test "can parse! QFX data" do
ofx_raw = File.read!("test/fixtures/multiple_accounts.ofx")
%{accounts: [_bank_account1, _bank_account2, _cc_account]} = Ofex.parse!(ofx_raw)
%{accounts: accounts} = Ofex.parse!(ofx_raw)
assert length(accounts) == 3
end

test "can parse file with unsafe &" do
Expand Down

0 comments on commit d4aa99d

Please sign in to comment.