Skip to content

Commit

Permalink
add test for resume available method
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 12, 2015
1 parent 00be621 commit 1a198ef
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/boot_arch_test.rb
Expand Up @@ -10,6 +10,7 @@ def stub_arch(arch)

allow(Yast::Arch).to receive(:architecture).and_return(arch)
end

describe ".VgaAvailable" do
it "returns true if it is on x86_64 architecture" do
stub_arch("x86_64")
Expand All @@ -29,4 +30,30 @@ def stub_arch(arch)
expect(subject.VgaAvailable).to eq false
end
end

describe ".ResumeAvailable" do
it "returns true if it is on x86_64 architecture" do
stub_arch("x86_64")

expect(subject.ResumeAvailable).to eq true
end

it "returns true if it is on i386 architecture" do
stub_arch("i386")

expect(subject.ResumeAvailable).to eq true
end

it "returns true if it is on s390 architecture" do
stub_arch("s390_64")

expect(subject.ResumeAvailable).to eq true
end

it "otherwise it returns false" do
stub_arch("ppc64")

expect(subject.ResumeAvailable).to eq false
end
end
end

0 comments on commit 1a198ef

Please sign in to comment.