Skip to content

Commit

Permalink
tests: added missing test for validate status 303 decoding strategy (#39
Browse files Browse the repository at this point in the history
)
  • Loading branch information
philprime authored Dec 6, 2023
1 parent 7a33ab6 commit 3809418
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@testable import Postie
import XCTest

class ValidateStatus303BodyStrategyTests: XCTestCase {
func testAllowsEmptyContent_statusIs303_shouldBeTrue() {
XCTAssertTrue(ValidateStatus303BodyStrategy.allowsEmptyContent(for: 303))
}

func testAllowsEmptyContent_statusIsNot303_shouldBeTrue() {
XCTAssertTrue(ValidateStatus303BodyStrategy.allowsEmptyContent(for: 999))
}

func testValidate_statusIs303_shouldBeTrue() {
XCTAssertTrue(ValidateStatus303BodyStrategy.validate(statusCode: 303))
}

func testValidate_statusIsNot303_shouldBeFalse() {
XCTAssertFalse(ValidateStatus303BodyStrategy.validate(statusCode: 999))
}
}

0 comments on commit 3809418

Please sign in to comment.