d9deb24f3a
The previous behavior was, that the first element of the select was preselected, thus upon saving the project, the previous selected could be overwritten.
23 lines
901 B
Ruby
23 lines
901 B
Ruby
require 'spec_helper'
|
|
|
|
describe ProjectsHelper do
|
|
describe '#project_issues_trackers' do
|
|
it "returns the correct issues trackers available" do
|
|
project_issues_trackers.should ==
|
|
"<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
|