Sha256: 98a8fe2e6a3a4a0af383060c1cec73e677c81a53ac28f5426dfaadad47f64944

Contents?: true

Size: 670 Bytes

Versions: 15

Compression:

Stored size: 670 Bytes

Contents

require 'test_helper'

module PushType
  class UsersControllerTest < ActionController::TestCase

    let(:current_user) { FactoryGirl.create(:confirmed_user) }
    let(:user) { FactoryGirl.create :user }
    before { sign_in current_user }

    let(:last_email) { ActionMailer::Base.deliveries.last }
    
    describe 'PUT #invite' do
      let(:referer) { '/push_type/users' }
      before do
        @request.env["HTTP_REFERER"] = referer
        put :invite, id: user.id
      end
      it { response.must_redirect_to referer }
      it { last_email.to.must_include user.email }
      it { last_email.subject.must_include 'Confirm your account' }
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
push_type_auth-0.8.2 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.8.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.8.0 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.8.0.beta.3 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.8.0.beta.2 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.8.0.beta.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.7.0 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.7.0.beta.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.6.0 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.6.0.beta.4 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.6.0.beta.3 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.6.0.beta.2 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.6.0.beta.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.3 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.2 test/controllers/push_type/users_controller_test.rb