Skip to content

Commit

Permalink
Rename Bool tests from saying array to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
serjooo committed Feb 15, 2020
1 parent 740ee09 commit 87d9e08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/BetterCodableTests/DefaultFalseTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class DefaultFalseTests: XCTestCase {
@DefaultFalse var truthy: Bool
}

func testDecodingFailableArrayDefaultsToEmptyArray() throws {
func testDecodingFailableArrayDefaultsToFalse() throws {
let jsonData = #"{ "truthy": null }"#.data(using: .utf8)!
let fixture = try JSONDecoder().decode(Fixture.self, from: jsonData)
XCTAssertEqual(fixture.truthy, false)
Expand All @@ -18,7 +18,7 @@ class DefaultFalseTests: XCTestCase {
XCTAssertEqual(fixture.truthy, false)
}

func testEncodingDecodedFailableArrayDefaultsToEmptyArray() throws {
func testEncodingDecodedFailableArrayDefaultsToFalse() throws {
let jsonData = #"{ "truthy": null }"#.data(using: .utf8)!
var _fixture = try JSONDecoder().decode(Fixture.self, from: jsonData)

Expand All @@ -29,7 +29,7 @@ class DefaultFalseTests: XCTestCase {
XCTAssertEqual(fixture.truthy, true)
}

func testEncodingDecodedFulfillableArrayRetainsContents() throws {
func testEncodingDecodedFulfillableBoolRetainsValue() throws {
let jsonData = #"{ "truthy": true }"#.data(using: .utf8)!
let _fixture = try JSONDecoder().decode(Fixture.self, from: jsonData)
let fixtureData = try JSONEncoder().encode(_fixture)
Expand Down

0 comments on commit 87d9e08

Please sign in to comment.