diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index ee8c63a6..8852f24f 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -42,7 +42,7 @@ class WikiController < ApplicationController # Within a single web --------------------------------------------------------- def authors - @authors = @web.select.authors + @authors = @web.select.authors.sort end def export_html diff --git a/app/views/wiki/authors.rhtml b/app/views/wiki/authors.rhtml index 0a2942a7..97eb5c9d 100644 --- a/app/views/wiki/authors.rhtml +++ b/app/views/wiki/authors.rhtml @@ -5,7 +5,7 @@
  • <%= link_to_page author %> co- or authored: - <%= @web.select.pages_authored_by(author).collect { |page| link_to_page(page.name) }.join ', ' %> + <%= @web.select.pages_authored_by(author).collect { |page| link_to_page(page.name) }.sort.join ', ' %>
  • <% end %> diff --git a/test/watir/e2e.rb b/test/watir/e2e.rb index 5e4d84a7..4df1150a 100644 --- a/test/watir/e2e.rb +++ b/test/watir/e2e.rb @@ -192,13 +192,16 @@ class E2EInstikiTest < Test::Unit::TestCase ie.link(:text, 'Authors').click expected_authors = - 'Anonymous Coward\? co- or authored: Test Edit Page, Another Wiki Page, Home Page.*' + - 'Another Author co- or authored: Test Edit Page, Another Author.*' + + 'Anonymous Coward\? co- or authored: Another Wiki Page, Home Page, Test Edit Page.*' + + 'Another Author co- or authored: Another Author, Test Edit Page.*' + 'Author\? co- or authored: Test Edit Page' assert_match Regexp.new(expected_authors, Regexp::MULTILINE), ie.text ie.link(:text, 'Another Author').click assert_equal url(:show, 'Another Author'), ie.url + ie.back + ie.link(:text, 'Test Edit Page').click + assert_equal url(:show, 'TestEditPage'), ie.url end private