-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
properly prepend ProvisioningTemplate class with helper (#28)
fixes error during settings rendering because method is not found
- Loading branch information
1 parent
0973c3e
commit 07e1001
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'test_plugin_helper' | ||
|
||
class ProvisioningHostTest < ActiveSupport::TestCase | ||
setup do | ||
User.current = FactoryBot.build(:user, :admin) | ||
disable_orchestration | ||
end | ||
|
||
context 'provisioning template query' do | ||
context 'with type PXELinux' do | ||
let(:type) do | ||
'PXELinux' | ||
end | ||
|
||
test 'should return templates' do | ||
templates = ProvisioningTemplate.templates_by_kind(type) | ||
|
||
assert_includes templates, 'PXE Default Menu' | ||
assert_includes templates, 'PXELinux default local boot' | ||
assert_includes templates, 'PXELinux global default' | ||
end | ||
end | ||
end | ||
end |