Skip to content

Commit

Permalink
migrated test
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomez04 committed Oct 24, 2024
1 parent c2d70b9 commit 4ab1e27
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 188 deletions.
19 changes: 19 additions & 0 deletions internal/providers/pluginfw/resources/user/data_users_test.go
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)
}
188 changes: 0 additions & 188 deletions scim/data_users_test.go

This file was deleted.

0 comments on commit 4ab1e27

Please sign in to comment.