Skip to content

Commit

Permalink
New test
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Dec 22, 2019
1 parent 6f46546 commit 46bbced
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Tests/Send-TeamsNew.Tests.ps1
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"
}
}
}
}

0 comments on commit 46bbced

Please # to comment.