Skip to content

Commit

Permalink
🩹 [Patch]: Add tests for LoginTime and UserPreferences types in Context
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusStorhaug committed Nov 21, 2024
1 parent f6819cd commit 647cd9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Context.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,14 @@ Describe 'Context' {
$object.AuthToken | ConvertFrom-SecureString -AsPlainText | Should -Be 'ghp_12345ABCDE67890FGHIJ'
$object.LastLoginAttempts[0].IP | Should -BeOfType [System.Security.SecureString]
$object.LastLoginAttempts[0].IP | ConvertFrom-SecureString -AsPlainText | Should -Be '192.168.1.101'
$object.LoginTime | Should -BeOfType [datetime]
$object.Repositories[0].Languages | Should -Be @('Python', 'JavaScript')
$object.Repositories[1].IsPrivate | Should -BeOfType [bool]
$object.Repositories[1].IsPrivate | Should -Be $false
$object.SessionMetaData.Location.City | Should -BeOfType [string]
$object.SessionMetaData.Location.City | Should -Be 'New York'
$object.UserPreferences | Should -BeOfType [System.Management.Automation.PSCustomObject]
$object.UserPreferences.GetType().BaseType.Name | Should -Be 'Hashtable'
$object.UserPreferences.CodeReview.GetType().BaseType.Name | Should -Be 'Array'
$object.UserPreferences.CodeReview.Count | Should -Be 2
$object.UserPreferences.CodeReview | Should -Be @('PR Comments', 'Inline Suggestions')
Expand Down

0 comments on commit 647cd9a

Please sign in to comment.