Skip to content

Bulk user creation (Go)

### ✅ Bulk user creation
- **Given** the following users exist
**Users**
| email | role | status |
| ----------------- | ----- | ------ |
| [email protected] | admin | active |
| [email protected] | user | active |
| [email protected] | user | locked |
- **When** the admin opens the user list
- **Then** the user list should include
**Expected**
| email | role | status |
| ----------------- | ----- | ------ |
| [email protected] | admin | active |
| [email protected] | user | active |
| [email protected] | user | locked |
import (
"testing"
es "github.com/jagreehal/executable-stories/packages/executable-stories-go"
)
func TestBulkUserCreation(t *testing.T) {
s := es.Init(t, "Bulk user creation")
s.Given("the following users exist")
s.Table("Users",
[]string{"email", "role", "status"},
[][]string{
{"[email protected]", "admin", "active"},
{"[email protected]", "user", "active"},
{"[email protected]", "user", "locked"},
},
)
s.When("the admin opens the user list")
s.Then("the user list should include")
s.Table("Expected",
[]string{"email", "role", "status"},
[][]string{
{"[email protected]", "admin", "active"},
{"[email protected]", "user", "active"},
{"[email protected]", "user", "locked"},
},
)
}