diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-08 00:09:44 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-08 00:09:44 -0600 |
commit | 7e8be6bd6f6e487d3444f70f01240c542b5f8b0b (patch) | |
tree | 048b37f9fff624cf6cb374bc0f4843a21ca0992d /tests/spec/simulator_spec.rb | |
parent | 3ab436a3d897b7fc76ed9e1718198bc6f012e286 (diff) | |
download | horizon-7e8be6bd6f6e487d3444f70f01240c542b5f8b0b.tar.gz horizon-7e8be6bd6f6e487d3444f70f01240c542b5f8b0b.tar.bz2 horizon-7e8be6bd6f6e487d3444f70f01240c542b5f8b0b.tar.xz horizon-7e8be6bd6f6e487d3444f70f01240c542b5f8b0b.zip |
hscript: Implement UserIcon::execute, add tests
Diffstat (limited to 'tests/spec/simulator_spec.rb')
-rw-r--r-- | tests/spec/simulator_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb index a208be7..df2b2ae 100644 --- a/tests/spec/simulator_spec.rb +++ b/tests/spec/simulator_spec.rb @@ -344,4 +344,21 @@ printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto noatime >> expect(last_command_started.stdout).to include('usermod -aG ') end end + context "simulating 'usericon' execution" do + it "creates the dir if needed" do + use_fixture '0098-usericon-basic.installfile' + run_simulate + expect(last_command_started.stdout).to include("mkdir -p /target/var/lib/AccountsService/icons") + end + it "downloads remote icons" do + use_fixture '0102-usericon-protocols.installfile' + run_simulate + expect(last_command_started.stdout).to include("curl -LO /target/var/lib/AccountsService/icons/chris http://www.adelielinux.org/") + end + it "copies the correct icon" do + use_fixture '0098-usericon-basic.installfile' + run_simulate + expect(last_command_started.stdout).to include("cp /usr/share/user-manager/avatars/circles/Cat.png /target/var/lib/AccountsService/icons/awilfox") + end + end end |