mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Fixes to tests to be run x-plaform
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user