CSCI-GA-2820-FA24-001 / customers

NYU DevOps Customers Service Fall 2024
Apache License 2.0
0 stars 1 forks source link

Add Suspend Customer Account Action #28

Closed ananya-muralidhar closed 2 weeks ago

ananya-muralidhar commented 1 month ago

Description: -As a Customer Manager, -I need the ability to suspend a customer account, -So that I can prevent the customer from using the service.

Details and Assumptions: -Suspending an account will update the customer's status in the PostgreSQL database to "suspended." -The customer should no longer be able to log in or make transactions.

Acceptance Criteria: -Given a customer exists in the system, -When I suspend the customer account, -Then the customer’s account status should be updated in the database, And the customer should no longer be able to perform actions in the system.

molliey commented 1 month ago

I think the tile can be more specific like Suspended a Customer Account.

lzivan commented 3 weeks ago

What you think adding

def test_deactivate_customer_not_found(self):
        """It should not Deactivate a Customer that doesn't exist"""
        response = self.client.put(f"{BASE_URL}/0/deactivate")
        self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)

to the TestSadPaths?