File: attribute_test.go

package info (click to toggle)
golang-github-openfga-go-sdk 0.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 1,960 kB
  • sloc: makefile: 13
file content (22 lines) | stat: -rw-r--r-- 443 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package telemetry

import (
	"testing"
)

func TestAttributeCreation(t *testing.T) {
	attrName := "test-attribute"
	attr := &Attribute{Name: attrName}

	if attr.Name != attrName {
		t.Errorf("Expected Attribute Name to be '%s', but got '%s'", attrName, attr.Name)
	}
}

func TestEmptyAttributeCreation(t *testing.T) {
	attr := &Attribute{}

	if attr.Name != "" {
		t.Errorf("Expected Attribute Name to be empty, but got '%s'", attr.Name)
	}
}