summaryrefslogtreecommitdiff
path: root/tests/username-change/username-change.Tests.ps1
blob: dd10173eea776686b06c1f50f5f83ca304ae656f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
BeforeAll {
  . $PSScriptRoot/../lib/lib.ps1
}

Describe "Login Shell" {
  BeforeAll {
    $distro = Install-Distro
  }

  It "should be possible to change the username" {
    $distro.Launch("whoami") | Select-Object -Last 1 | Should -BeExactly "nixos"
    $distro.InstallConfig("$PSScriptRoot/username-change.nix")
    $distro.Launch("whoami") | Select-Object -Last 1 | Should -BeExactly "different-name"
  }

  AfterAll {
    $distro.Uninstall()
  }
}