Skip to content

Commit

Permalink
Test case for new Storage.SetUserData function
Browse files Browse the repository at this point in the history
  • Loading branch information
kobliha committed Aug 26, 2015
1 parent 0b52c23 commit fa89b07
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/storage_test.rb
@@ -0,0 +1,21 @@
#!/usr/bin/env rspec

ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)

require "yast"

Yast.import "Storage"
Yast.import "StorageInit"

describe "Yast::Storage" do
before do
Yast::Storage.InitLibstorage(false)
end

describe "#SetUserdata" do
it "sets given user data for a given device" do
# non-zero error for device that does not exist
expect(Yast::Storage.SetUserdata("/dev/ice/does/not/exist", { "/" => "snapshots" })).not_to eq(0)
end
end
end

0 comments on commit fa89b07

Please sign in to comment.