@@ -5,12 +5,7 @@ Import-Module .\Toggl.API\Toggl.API.psm1 -Force
55
66Describe ' TimeEntries Integration Tests' {
77 BeforeAll {
8- $configPath = Join-Path - Path $PSScriptRoot - ChildPath " ..\config.json"
9- $config = Get-Content - Path $configPath | ConvertFrom-Json
10-
11- $apiToken = $config.apiToken
12- $workspaceId = $config.workspaceId
13-
8+ . " $PSScriptRoot \..\Initialize-Parameters.ps1"
149 $timeEntryId = $null
1510 }
1611
@@ -34,7 +29,7 @@ Describe 'TimeEntries Integration Tests' {
3429 }
3530
3631 Context " Get-TogglTimeEntryById" {
37- It " should retrieve the created time entry by ID" - Skip:( $ Script :timeEntryId -eq $null ) {
32+ It " should retrieve the created time entry by ID" {
3833 $response = Get-TogglTimeEntryById `
3934 - ApiToken $apiToken `
4035 - TimeEntryId $Script :timeEntryId
@@ -55,7 +50,7 @@ Describe 'TimeEntries Integration Tests' {
5550 }
5651
5752 Context " Update-TogglTimeEntry" {
58- It " should update the time entry" - Skip:( $ Script :timeEntryId -eq $null ) {
53+ It " should update the time entry" {
5954 $newDescription = " Updated Test Time Entry"
6055
6156 $response = Update-TogglTimeEntry `
@@ -64,7 +59,7 @@ Describe 'TimeEntries Integration Tests' {
6459 - TimeEntryId $Script :timeEntryId `
6560 - Description $newDescription
6661
67- $response | Should Not BeNullOrEmpty
62+ $response | Should - Not - BeNullOrEmpty
6863 $response.description | Should - BeExactly $newDescription
6964 }
7065 }
@@ -85,7 +80,7 @@ Describe 'TimeEntries Integration Tests' {
8580 }
8681
8782 Context " Remove-TogglTimeEntry" {
88- It " should delete the time entry" - Skip:( $ Script :timeEntryId -eq $null ) {
83+ It " should delete the time entry" {
8984 Remove-TogglTimeEntry `
9085 - ApiToken $apiToken `
9186 - WorkspaceId $workspaceId `
0 commit comments