-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc646ef
commit 4265348
Showing
3 changed files
with
99 additions
and
8 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
32 changes: 32 additions & 0 deletions
32
apps/dashboard/test/lib/smart_attributes/auto_output_directory_test.rb
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,32 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'test_helper' | ||
require 'smart_attributes' | ||
|
||
module SmartAttributes | ||
class AutoOutputDirectoryTest < ActiveSupport::TestCase | ||
def setup | ||
stub_clusters | ||
stub_user | ||
stub_sacctmgr | ||
end | ||
|
||
def dynamic_env | ||
{ | ||
OOD_BC_DYNAMIC_JS: 'true' | ||
} | ||
end | ||
|
||
test 'correctly sets the value' do | ||
with_modified_env(dynamic_env) do | ||
options = { | ||
value: 'output_extravaganza', | ||
label: 'Output Directory' | ||
} | ||
attribute = SmartAttributes::AttributeFactory.build('auto_output_directory', options) | ||
|
||
assert_equal('output_extravaganza', attribute.value.to_s) | ||
end | ||
end | ||
end | ||
end |
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