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
Showing
5 changed files
with
86 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<p> | ||
<%= content_tag(:label, l(:issue_aging_text_number_of_days_for_warning), :for => 'settings_status_warning_days') %> | ||
<%= text_field_tag("settings[status_warning_days]", @settings['status_warning_days']) %> | ||
</p> | ||
|
||
<p> | ||
<%= content_tag(:label, l(:issue_aging_text_number_of_days_for_error), :for => 'settings_status_error_days') %> | ||
<%= text_field_tag("settings[status_error_days]", @settings['status_error_days']) %> | ||
</p> | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# English strings go here for Rails i18n | ||
en: | ||
my_label: "My label" | ||
issue_aging_text_number_of_days_for_warning: "Number of days before an issue enters the warning state" | ||
issue_aging_text_number_of_days_for_error: "Number of days before an issue enters the error state" |
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,40 @@ | ||
require 'test_helper' | ||
|
||
class ConfigurationTest < ActionController::IntegrationTest | ||
def setup | ||
@user = User.generate!(:password => 'test', :password_confirmation => 'test', :admin => true) | ||
end | ||
|
||
should "add a plugin configuration panel" do | ||
login_as(@user.login, 'test') | ||
visit_home | ||
click_link 'Administration' | ||
assert_response :success | ||
|
||
click_link 'Plugins' | ||
assert_response :success | ||
|
||
click_link 'Configure' | ||
assert_response :success | ||
end | ||
|
||
should "be able to configure the status warning days" do | ||
login_as(@user.login, 'test') | ||
visit_configuration_panel | ||
|
||
fill_in "Number of days before an issue enters the warning state", :with => '30' | ||
click_button 'Apply' | ||
|
||
assert_equal '30', plugin_configuration['status_warning_days'] | ||
end | ||
|
||
should "be able to configure the status error days" do | ||
login_as(@user.login, 'test') | ||
visit_configuration_panel | ||
|
||
fill_in "Number of days before an issue enters the error state", :with => '90' | ||
click_button 'Apply' | ||
|
||
assert_equal '90', plugin_configuration['status_error_days'] | ||
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