Sha256: d21a564cb79df3eae35eb26beb3a603bf3aecbc91fefdd1f6598aaabb0cbcec0

Contents?: true

Size: 718 Bytes

Versions: 22

Compression:

Stored size: 718 Bytes

Contents

require 'test_helper'

class AdminControllerTest < ActionController::TestCase
  include AuthenticatedTestHelper
  fixtures :users, :roles, :roles_users
  # Replace this with your real tests.
  test "send recap" do
    login_as :admin
    post(:recap, {:subject => 'subject', :content => 'content', :id => 2})
    assert_response :success
    assert_equal 1, ActionMailer::Base.deliveries.size, "There should have been an email sent."
    mail = ActionMailer::Base.deliveries.first
    assert_equal [ADMIN_EMAIL], mail.to
    recips = Pool.find(2).entrants.map{|u| u.email}
    assert_equal recips, mail.bcc
    assert_equal "[#{TOURNAMENT_TITLE}] subject", mail.subject
    assert_match /content/, mail.body
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
tournament-5.0.0 webgui/test/functional/admin_controller_test.rb
tournament-4.2.0 webgui/test/functional/admin_controller_test.rb
tournament-4.0.2 webgui/test/functional/admin_controller_test.rb
tournament-4.0.0 webgui/test/functional/admin_controller_test.rb
tournament-3.3.3 webgui/test/functional/admin_controller_test.rb
tournament-3.3.2 webgui/test/functional/admin_controller_test.rb
tournament-3.3.1 webgui/test/functional/admin_controller_test.rb
tournament-3.3.0 webgui/test/functional/admin_controller_test.rb
tournament-3.2.2 webgui/test/functional/admin_controller_test.rb
tournament-3.2.1 webgui/test/functional/admin_controller_test.rb
tournament-3.2.0 webgui/test/functional/admin_controller_test.rb
tournament-3.1.1 webgui/test/functional/admin_controller_test.rb
tournament-3.1.0 webgui/test/functional/admin_controller_test.rb
tournament-3.0.3 webgui/test/functional/admin_controller_test.rb
tournament-3.0.2 webgui/test/functional/admin_controller_test.rb
tournament-3.0.1 webgui/test/functional/admin_controller_test.rb
tournament-3.0.0 webgui/test/functional/admin_controller_test.rb
tournament-2.5.0 webgui/test/functional/admin_controller_test.rb
tournament-2.4.0 webgui/test/functional/admin_controller_test.rb
tournament-2.6.0 webgui/test/functional/admin_controller_test.rb