示例#1
0
func TestClientIsEnabledUnknown(t *testing.T) {
	server := api.NewTestServer(t)
	defer server.Close()

	client, err := NewClient(Config{
		Addr:        server.URL,
		Username:    "******",
		Password:    "******",
		Environment: "test",
	})
	require.NoError(t, err)

	status := client.IsEnabled("awesome_unknown_feature", true)
	require.True(t, status)
}
示例#2
0
func TestClientIsEnabled(t *testing.T) {
	server := api.NewTestServer(t)
	defer server.Close()

	feature := api.CreateTestFeature(t)

	client, err := NewClient(Config{
		Addr:        server.URL,
		Username:    "******",
		Password:    "******",
		Environment: "test",
	})
	require.NoError(t, err)

	status := client.IsEnabled(feature.Name, false)
	require.True(t, status)
}