Skip to content

Commit 441c547

Browse files
author
Joel Butcher
committed
added tests
1 parent 5860766 commit 441c547

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Feature/SettingsTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@
8181
assertPasswordWasHashedAndSaved();
8282
});
8383

84+
test('users see the their avatar', function () {
85+
$this->login();
86+
87+
$this->visit('/settings')
88+
->see('<img src="https://unavatar.now.sh/github/johndoe?fallback=http%3A%2F%2Flocalhost%2Fimages%2Fuser.svg" alt="John Doe" class="rounded-full text-gray-500 h-32 w-32 mt-4">');
89+
});
90+
91+
test('users see the default Laravel avatar', function () {
92+
$this->login([
93+
'github_username' => null,
94+
]);
95+
96+
$this->visit('/settings')
97+
->see('<img src="http://localhost/images/laravel.png" alt="John Doe" class="filter grayscale">');
98+
});
99+
84100
test('users cannot update their password when it has been compromised in data leaks', function () {
85101
$this->login();
86102

0 commit comments

Comments
 (0)