From 5cd956a4505ef6817a0de773394cab19e8e1022b Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 20 Mar 2013 20:16:56 +0000 Subject: [PATCH] Fixed test: features/send_email_to_environment_members.feature --- app/views/admin_panel/site_info.rhtml | 2 +- app/views/users/send_mail.rhtml | 2 +- features/send_email_to_environment_members.feature | 20 ++++---------------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app/views/admin_panel/site_info.rhtml b/app/views/admin_panel/site_info.rhtml index b8df356..4ab7f2f 100644 --- a/app/views/admin_panel/site_info.rhtml +++ b/app/views/admin_panel/site_info.rhtml @@ -4,7 +4,7 @@ <%= render :file => 'shared/tiny_mce' %> -<% labelled_form_for :environment, @environment, :url => {:host => @environment.default_hostname, :port => request.port} do |f| %> +<% labelled_form_for :environment, @environment do |f| %> <% tabs = [] %> <% tabs << {:title => _('Site info'), :id => 'site-info', :content => (render :partial => 'site_info', :locals => {:f => f})} %> diff --git a/app/views/users/send_mail.rhtml b/app/views/users/send_mail.rhtml index 1879b79..2381a81 100644 --- a/app/views/users/send_mail.rhtml +++ b/app/views/users/send_mail.rhtml @@ -4,7 +4,7 @@ <%= render :file => 'shared/tiny_mce' %> -<% form_for :mailing, :url => {:action => 'send_mail', :host => @environment.default_hostname} do |f| %> +<% form_for :mailing do |f| %> <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %> <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %> <%= submit_button(:send, _('Send')) %> diff --git a/features/send_email_to_environment_members.feature b/features/send_email_to_environment_members.feature index f1dc3bd..0acbcbc 100644 --- a/features/send_email_to_environment_members.feature +++ b/features/send_email_to_environment_members.feature @@ -15,43 +15,31 @@ Feature: send emails to environment members users When I go to /admin/users/send_mail Then I should see "Access denied" - @selenium-fixme Scenario: Send e-mail to members Given I am logged in as admin - When I follow "Administration" - And I follow "Users" - And I follow "Send e-mail to users" + And I go to /admin/users/send_mail And I fill in "Subject" with "Hello, user!" And I fill in "Body" with "We have some news" When I press "Send" Then I should be on /admin/users - @selenium-fixme Scenario: Not send e-mail to members if subject is blank Given I am logged in as admin - When I follow "Administration" - And I follow "Users" - And I follow "Send e-mail to users" + And I go to /admin/users/send_mail And I fill in "Body" with "We have some news" When I press "Send" Then I should be on /admin/users/send_mail - @selenium Scenario: Not send e-mail to members if body is blank Given I am logged in as admin - When I follow "Administration" - And I follow "Users" - And I follow "Send e-mail to users" + And I go to /admin/users/send_mail And I fill in "Subject" with "Hello, user!" When I press "Send" Then I should be on /admin/users/send_mail - @selenium Scenario: Cancel creation of mailing Given I am logged in as admin - When I follow "Administration" - And I follow "Users" - And I follow "Send e-mail to users" + And I go to /admin/users/send_mail Then I should be on /admin/users/send_mail When I follow "Cancel e-mail" Then I should be on /admin/users -- libgit2 0.21.2