microsoft / powerbi-powershell

PowerShell community for Microsoft PowerBI. Here you will find resources and source for PowerShell modules targeting PowerBI.
MIT License
346 stars 120 forks source link

New-PowerBIReport issues when creating reports containing ":" #193

Open ZanattaMichael opened 5 years ago

ZanattaMichael commented 5 years ago

When creating reports with the name containing ":" will create a malformed report name from the chars after the ":".

For Example: (Local) "TEST 123 : TEST" -eq " TEST" (PowerBI)

Integration Test:

Describe "Testing New-Report" {
    Context "Testing Reports Containing `":`" {
         # Arrange
         $reportName = "Test Report : Name"
         # Act
         $results = New-PowerBIReport -WorkspaceId "GUID"`
                                                    -Path $.ExportPath `
                                                    -Name $reportName `
                                                    -ConflictAction Abort
        # Assert
        it "The created Name should be the same" {
              $results.Name | Should equal $reportName
        }
    }

}
ZanattaMichael commented 5 years ago

This also applies to the following characters: : . \ / "