2013-10-08 10:21:40 -04:00
|
|
|
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
|
2013-11-01 10:33:47 -04:00
|
|
|
|
|
|
|
it "returns the correct issues trackers available with current tracker 'gitlab' selected" do
|
|
|
|
project_issues_trackers('gitlab').should ==
|
|
|
|
"<option value=\"redmine\">Redmine</option>\n" \
|
2013-12-10 05:08:40 -05:00
|
|
|
"<option selected=\"selected\" value=\"gitlab\">GitLab</option>"
|
2013-11-01 10:33:47 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it "returns the correct issues trackers available with current tracker 'redmine' selected" do
|
|
|
|
project_issues_trackers('redmine').should ==
|
2013-12-10 05:08:40 -05:00
|
|
|
"<option selected=\"selected\" value=\"redmine\">Redmine</option>\n" \
|
2013-11-01 10:33:47 -04:00
|
|
|
"<option value=\"gitlab\">GitLab</option>"
|
|
|
|
end
|
2013-10-08 10:21:40 -04:00
|
|
|
end
|
|
|
|
end
|