adapt tests to new translations

pull/115/head
Philipp Tessenow 12 years ago
parent a9a243532b
commit 9dd5974a44
  1. 6
      test/fixtures/mail_handler/ticket_with_localized_attributes.eml
  2. 8
      test/integration/lib/redmine/menu_manager_test.rb
  3. 2
      test/unit/mail_handler_test.rb

@ -37,7 +37,7 @@ dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
Projet: onlinestore
Projekt: onlinestore
Tracker: Feature request
catégorie: Stock management
priorité: Urgent
Categorie: Stock management
Priorität: Urgent

@ -19,15 +19,15 @@ class MenuManagerTest < ActionDispatch::IntegrationTest
fixtures :all
def test_project_menu_with_specific_locale
Setting.available_languages = [:fr, :en]
get 'projects/ecookbook/issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'
Setting.available_languages = [:de, :en]
get 'projects/ecookbook/issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'de,de-de;q=0.8,en-us;q=0.5,en;q=0.3'
assert_tag :div, :attributes => { :id => 'main-menu' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => ll('fr', :label_activity),
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => ll('de', l(:label_activity)),
:attributes => { :href => '/projects/ecookbook/activity',
:class => 'activity ellipsis' } } }
assert_tag :div, :attributes => { :id => 'main-menu' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => ll('fr', :label_issue_plural),
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => ll('de', :label_issue_plural),
:attributes => { :href => '/projects/ecookbook/issues',
:class => 'issues ellipsis selected' } } }
end

@ -247,7 +247,7 @@ class MailHandlerTest < ActiveSupport::TestCase
end
def test_add_issue_with_localized_attributes
User.find_by_mail('jsmith@somenet.foo').update_attribute 'language', 'fr'
User.find_by_mail('jsmith@somenet.foo').update_attribute 'language', 'de'
issue = submit_email('ticket_with_localized_attributes.eml', :allow_override => 'tracker,category,priority')
assert issue.is_a?(Issue)
assert !issue.new_record?

Loading…
Cancel
Save