search for: admin_account_url

Displaying 2 results from an estimated 2 matches for "admin_account_url".

2008 Feb 04
1
Error on nil.build
...@account = Account.new(params[:account]) @user = @account.users.build(params[:user]) if @account.save #log the user in to allow them to be directed to their control panel self.current_user = User.authenticate(params[:user][:login], params[:user][:password]) redirect_to admin_account_url(@account) else render :action => "new" end end ======================== It is this test that fails it "should make the relation to the users" do @account.should_receive(:users).and_return do_post end with the following error: ======================== NoM...
2012 Jun 08
0
Having difficulty testing redirects with Rspec and Capybara
...subject { page } let(:user) { FactoryGirl.create(:user) } let(:account) { user.owned_accounts.create!(name: "ACME Corp", subdomain: "acme") } describe "Admin::Accounts#show" do context "as non-signed in user" do before do visit admin_account_url(account, host: get_host(account)) end it "should redirect to the login page" do assert_redirected_to signin_path end end end end -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view t...