Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohannes Schleifenbaum <johannes@js-webcoding.de>2013-11-01 18:33:47 +0400
committerJohannes Schleifenbaum <johannes@js-webcoding.de>2013-11-01 18:33:47 +0400
commitd9deb24f3a507933106b2c9a00a9bc73f9eee269 (patch)
tree387f1b540d7f4f86abf2368d1ffa8c34a7a3a5d4 /spec
parentc27e49e916cebf87a5dc9e6cf1669d33f7e8cd8c (diff)
Preselect the current issue tracker with selected="selected"
The previous behavior was, that the first element of the select was preselected, thus upon saving the project, the previous selected could be overwritten.
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/projects_helper_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index 62f88dd522b..8156bcdd999 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -7,5 +7,17 @@ describe ProjectsHelper do
"<option value=\"redmine\">Redmine</option>\n" \
"<option value=\"gitlab\">GitLab</option>"
end
+
+ it "returns the correct issues trackers available with current tracker 'gitlab' selected" do
+ project_issues_trackers('gitlab').should ==
+ "<option value=\"redmine\">Redmine</option>\n" \
+ "<option value=\"gitlab\" selected=\"selected\">GitLab</option>"
+ end
+
+ it "returns the correct issues trackers available with current tracker 'redmine' selected" do
+ project_issues_trackers('redmine').should ==
+ "<option value=\"redmine\" selected=\"selected\">Redmine</option>\n" \
+ "<option value=\"gitlab\">GitLab</option>"
+ end
end
end