Skip to content

Commit

Permalink
Use a 1-based index in AutoYaST profile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Nov 27, 2017
1 parent 07e0bac commit b24ad5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/autoinstall/storage_proposal_issues_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def location(section)
text =
if value.is_a?(Array)
index = value.index(section)
"#{section.section_name}[#{index}]"
"#{section.section_name}[#{index+1}]"
else
section.section_name
end
Expand Down
4 changes: 2 additions & 2 deletions test/lib/storage_proposal_issues_presenter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
end

it "includes the location information" do
expect(presenter.to_html).to include "<li>drives[0] > partitions[1] > raid_options:<ul>"
expect(presenter.to_html).to include "<li>drives[1] > partitions[2] > raid_options:<ul>"
end
end

Expand Down Expand Up @@ -132,7 +132,7 @@
end

it "includes the location information" do
expect(presenter.to_plain).to include "* drives[0] > partitions[1] > raid_options:"
expect(presenter.to_plain).to include "* drives[1] > partitions[2] > raid_options:"
end
end

Expand Down

0 comments on commit b24ad5b

Please sign in to comment.