Sha256: 8d43518adbe0c89527f03f2f71029b5f616870c06428c3d61cb6e3b872ca74d0

Contents?: true

Size: 606 Bytes

Versions: 4

Compression:

Stored size: 606 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe Admin::ProfilesController do

  describe "#index" do
    it 'should render index' do
      users(:tobi).profile.label.should == 'admin'
      request.session = { :user => users(:tobi).id }
      get :index
      response.should render_template('index')
    end
  end

  # TODO: Make RESTful
  describe "successful POST to index" do
    it "redirects to the admin page" do
      request.session = { :user => users(:tobi).id }
      post :index, :user => {:email => 'foo@bar.com'}
      response.should redirect_to(admin_url)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typo-5.4.3 spec/controllers/admin/profiles_controller_spec.rb
typo-5.4.2 spec/controllers/admin/profiles_controller_spec.rb
typo-5.4.1 spec/controllers/admin/profiles_controller_spec.rb
typo-5.4 spec/controllers/admin/profiles_controller_spec.rb