Sha256: d9bce2b001f9ebdfe6226ae6108ee2df8f9284fa974cc21d7c6e34ded2b7beae

Contents?: true

Size: 646 Bytes

Versions: 6

Compression:

Stored size: 646 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_equal 'Confirmation instructions' }
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
push_type_auth-0.3.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.2.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.2.0 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.2.0.beta2 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.1.1 test/controllers/push_type/users_controller_test.rb
push_type_auth-0.1.0 test/controllers/push_type/users_controller_test.rb