-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
188 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
internal/providers/pluginfw/resources/user/data_users_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package user | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-framework/diag" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestValidateFilters(t *testing.T) { | ||
userInfo := UsersInfo{ | ||
DisplayNameContains: "filter", | ||
UserNameContains: "another_filter", | ||
} | ||
actualDiagnostics := validateFilters(&userInfo) | ||
expectedDiagnostics := diag.Diagnostics{diag.NewErrorDiagnostic("Invalid configuration", "Exactly one of display_name_contains or user_name_contains should be specified, not both.")} | ||
assert.True(t, actualDiagnostics.HasError()) | ||
assert.Equal(t, expectedDiagnostics, actualDiagnostics) | ||
} |
This file was deleted.
Oops, something went wrong.