Fixes to tests to be run x-plaform

This commit is contained in:
jhoneill
2019-08-27 00:31:30 +01:00
parent 9abbe2983b
commit a783b9c8ca
19 changed files with 173 additions and 122 deletions

View File

@@ -1,5 +1,5 @@
Import-Module $PSScriptRoot\..\ImportExcel.psd1 -Force
if (-not $env:TEMP) {$env:TEMP = [IO.Path]::GetTempPath() -replace "/$","" }
$xlFile = "$env:TEMP\testSQL.xlsx"
Describe "ConvertFrom-ExcelToSQLInsert" {
@@ -16,7 +16,7 @@ Describe "ConvertFrom-ExcelToSQLInsert" {
Remove-Item $xlFile -Recurse -Force -ErrorAction Ignore
}
It "Should be empty double single quotes" {
It "Should be empty double single quotes".PadRight(90) {
$expected="INSERT INTO Sheet1 ('Name', 'Age') Values('John', '');"
$actual = ConvertFrom-ExcelToSQLInsert -Path $xlFile Sheet1
@@ -24,7 +24,7 @@ Describe "ConvertFrom-ExcelToSQLInsert" {
$actual | should be $expected
}
It "Should have NULL" {
It "Should have NULL".PadRight(90) {
$expected="INSERT INTO Sheet1 ('Name', 'Age') Values('John', NULL);"
$actual = ConvertFrom-ExcelToSQLInsert -Path $xlFile Sheet1 -ConvertEmptyStringsToNull