Sha256: e968d9cef1e944552ee004648c4c06a3cb8744e57a7c754971be3b07e1c659ab

Contents?: true

Size: 973 Bytes

Versions: 18

Compression:

Stored size: 973 Bytes

Contents

require 'spec_helper'

describe Mtdevise::AccountsController do
	context "creates the account's schema" do
		routes { Mtdevise::Engine.routes }
		# let!(:account) { double(Mtdevise::Account) }
		# before do
		#   Mtdevise::Account.should_receive(:create_with_owner).
		#   and_return(account)
		#   allow(account).to receive(:valid?).and_return(value)
		#   account.stub :valid? => true
		#   controller.stub(:force_authentication!)
		# end
		let(:params) do
			{:account => {name: 'something', firstname: 'something', lastname: 'something', username: 'something', subdomain: 'something', owner_attributes: {email: 'bb@gmail.com', password: 'password', password_confirmation: 'password'}}}
		end

		context "the user is already signed in" do
			before do
				allow(subject).to receive(:user_signed_in).and_return(true)
			end
		end

		context "the user is not signed in" do
			before do
				allow(subject).to receive(:user_signed_in).and_return(false)
			end
		end
	end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mtdevise-3.5.5 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-3.5.1 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-3.5.0 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-3.0.4 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-3.0.2 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-3.0.0 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.7.0 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.6.6 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.6.5 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.5.9 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.5.7 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.5.5 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.5.2 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.5.0 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.0.5 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.0.2 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.0.1 spec/controllers/mtdevise/accounts_controller_spec.rb
mtdevise-2.0.0b spec/controllers/mtdevise/accounts_controller_spec.rb