mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-10 09:01:22 +00:00
21 lines
522 B
Go
21 lines
522 B
Go
//go:build !darwin
|
|
|
|
package liveattestation
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"testing"
|
|
)
|
|
|
|
func TestUnsupportedProviderReturnsExplicitPlatformError(t *testing.T) {
|
|
provider := NewProvider()
|
|
if err := provider.Check(context.Background()); !errors.Is(err, ErrUnsupportedPlatform) {
|
|
t.Fatalf("Check() error = %v, want ErrUnsupportedPlatform", err)
|
|
}
|
|
_, err := provider.Generate(context.Background())
|
|
if !errors.Is(err, ErrUnsupportedPlatform) {
|
|
t.Fatalf("Generate() error = %v, want ErrUnsupportedPlatform", err)
|
|
}
|
|
}
|