Sha256: 4c914e670322d4c4dc116dbab0000222dec44f2d42540709e639a51287bf2aa7

Contents?: true

Size: 643 Bytes

Versions: 10

Compression:

Stored size: 643 Bytes

Contents

require "test_helper"

module PushType
  describe UsersController do

    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

10 entries across 10 versions & 1 rubygems

Version Path
push_type_auth-0.5.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.0 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.0.alpha.5 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.0.alpha.4 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.0.alpha.3 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.0.alpha.2 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.5.0.alpha.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.4.0 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.4.0.beta.3 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.3.3 test/controllers/push_type/users_controller_test.rb