mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-01 21:10:13 +00:00
test: Add edge case test for isNotImplementedError fallback branch
Tab character triggers extractStatusCode fallback path (regex \s+ matches tab but ' 501' substring check doesn't). Coverage: 87.5% to 100%.
This commit is contained in:
parent
9e19ed45af
commit
e2172b16de
1 changed files with 2 additions and 0 deletions
|
|
@ -206,6 +206,8 @@ func TestIsNotImplementedError(t *testing.T) {
|
|||
{"not implemented but 500", "not implemented status 500", false},
|
||||
{"not implemented but 404", "not implemented error 404", false},
|
||||
{"space before 501 with not implemented", " 501 not implemented", true},
|
||||
// Tab character triggers extractStatusCode fallback (regex \s+ matches tab but " 501" check doesn't)
|
||||
{"tab before 501 with not implemented", "not implemented api error\t501", true},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue