@@ -5,12 +5,12 | |||||
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
6 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
7 | # of the License, or (at your option) any later version. | |
8 |
# |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 |
# |
|
13 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
@@ -20,7 +20,7 require File.expand_path('../../../test_helper', __FILE__) | |||||
20 | class ProjectsHelperTest < ActionView::TestCase |
|
20 | class ProjectsHelperTest < ActionView::TestCase | |
21 | include ApplicationHelper |
|
21 | include ApplicationHelper | |
22 | include ProjectsHelper |
|
22 | include ProjectsHelper | |
23 |
|
23 | |||
24 | fixtures :all |
|
24 | fixtures :all | |
25 |
|
25 | |||
26 | def setup |
|
26 | def setup | |
@@ -47,12 +47,12 class ProjectsHelperTest < ActionView::TestCase | |||||
47 | def test_link_to_version_invalid_version |
|
47 | def test_link_to_version_invalid_version | |
48 | assert_equal '', link_to_version(Object) |
|
48 | assert_equal '', link_to_version(Object) | |
49 | end |
|
49 | end | |
50 |
|
50 | |||
51 | def test_format_version_name_within_project |
|
51 | def test_format_version_name_within_project | |
52 | @project = Project.find(1) |
|
52 | @project = Project.find(1) | |
53 | assert_equal "0.1", format_version_name(Version.find(1)) |
|
53 | assert_equal "0.1", format_version_name(Version.find(1)) | |
54 | end |
|
54 | end | |
55 |
|
55 | |||
56 | def test_format_version_name |
|
56 | def test_format_version_name | |
57 | assert_equal "eCookbook - 0.1", format_version_name(Version.find(1)) |
|
57 | assert_equal "eCookbook - 0.1", format_version_name(Version.find(1)) | |
58 | end |
|
58 | end | |
@@ -60,7 +60,7 class ProjectsHelperTest < ActionView::TestCase | |||||
60 | def test_format_version_name_for_system_version |
|
60 | def test_format_version_name_for_system_version | |
61 | assert_equal "OnlineStore - Systemwide visible version", format_version_name(Version.find(7)) |
|
61 | assert_equal "OnlineStore - Systemwide visible version", format_version_name(Version.find(7)) | |
62 | end |
|
62 | end | |
63 |
|
63 | |||
64 | def test_version_options_for_select_with_no_versions |
|
64 | def test_version_options_for_select_with_no_versions | |
65 | assert_equal '', version_options_for_select([]) |
|
65 | assert_equal '', version_options_for_select([]) | |
66 | assert_equal '<option value="1" selected="selected">0.1</option>', version_options_for_select([], Version.find(1)) |
|
66 | assert_equal '<option value="1" selected="selected">0.1</option>', version_options_for_select([], Version.find(1)) |
General Comments 0
You need to be logged in to leave comments.
Login now