-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f46546
commit 46bbced
Showing
1 changed file
with
22 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
param ( | ||
$TeamsID = $Env:TEAMSPESTERID | ||
) | ||
#Requires -Modules Pester | ||
Import-Module $PSScriptRoot\..\PSTeams.psd1 -Force #-Verbose | ||
|
||
Describe 'Send-TeamsMessage - Should send messages properly with new syntax' { | ||
It 'Given 3 facts, 1 section should not throw' { | ||
Send-TeamsMessage -URI $TeamsID -MessageTitle 'PSTeams - Pester Test' -MessageText "This text will show up" -Color DodgerBlue { | ||
New-TeamsSection { | ||
New-TeamsActivityTitle -Title "**PSTeams**" | ||
New-TeamsActivitySubtitle -Subtitle "@PSTeams - $CurrentDate" | ||
New-TeamsActivityImage -Image Add | ||
New-TeamsActivityText -Text "This message proves PSTeams Pester test passed properly." | ||
New-TeamsFact -Name 'PS Version' -Value "**$($PSVersionTable.PSVersion)**" | ||
New-TeamsFact -Name 'PS Edition' -Value "**$($PSVersionTable.PSEdition)**" | ||
New-TeamsFact -Name 'OS' -Value "**$($PSVersionTable.OS)**" | ||
New-TeamsButton -Name 'Visit English Evotec Website' -Link "https://evotec.xyz" | ||
} | ||
} | ||
} | ||
} |