-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from keratin/gh169/case-insensitive-usernames
migrate to fix case sensitive usernames
- Loading branch information
Showing
4 changed files
with
63 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,14 @@ func testCreate(t *testing.T, store data.AccountStore) { | |
t.Errorf("expected uniqueness error, got %T %v", err, err) | ||
} | ||
|
||
account, err = store.Create("[email protected]", []byte("password")) | ||
if account != nil { | ||
assert.NotEqual(t, nil, account) | ||
} | ||
if !data.IsUniquenessError(err) { | ||
t.Errorf("expected uniqueness error, got %T %v", err, err) | ||
} | ||
|
||
// Assert that db connections are released to pool | ||
assert.Equal(t, 1, getOpenConnectionCount(store)) | ||
} | ||
|
@@ -69,6 +77,10 @@ func testFindByUsername(t *testing.T, store data.AccountStore) { | |
assert.NoError(t, err) | ||
assert.NotNil(t, account) | ||
|
||
account, err = store.FindByUsername("[email protected]") | ||
assert.NoError(t, err) | ||
assert.NotNil(t, account) | ||
|
||
// Assert that db connections are released to pool | ||
assert.Equal(t, 1, getOpenConnectionCount(store)) | ||
} | ||
|