-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APP-6820: Adding the Enable Billing Service Action #4630
base: main
Are you sure you want to change the base?
Conversation
@@ -989,6 +989,19 @@ func TestAppClient(t *testing.T) { | |||
test.That(t, err, test.ShouldBeNil) | |||
}) | |||
|
|||
t.Run("EnableBillingSevice", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need code in app_client? whats this testing then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// EnableBillingService enables a billing service to an address in an organization.
func (c *AppClient) EnableBillingService(ctx context.Context, orgID string, billingAddress *BillingAddress) error {
_, err := c.client.EnableBillingService(ctx, &pb.EnableBillingServiceRequest{
OrgId: orgID,
BillingAddress: billingAddressToProto(billingAddress),
})
return err
}
this is already in the code ^
cCtx, ac, out, errOut := setup(asc, nil, nil, nil, nil, "token") | ||
test.That(t, ac.organizationEnableBillingServiceAction(cCtx, "test-org", | ||
"123 Main St, Suite 100, San Francisco, CA, 94105"), test.ShouldBeNil) | ||
test.That(t, len(errOut.messages), test.ShouldEqual, 0) | ||
test.That(t, len(out.messages), test.ShouldEqual, 1) | ||
test.That(t, out.messages[0], test.ShouldContainSubstring, "Successfully enabled billing service for organization") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests for empty org + empty address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested manually ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you post example of output and it working? otherwise few nits but lgtm
This turns on the Billing Service from the CLI
Output:
With an empty orgID:
With a bad address:
with an empty address: