Sha256: 8ead971209a2e66e166e295b8b2bb69ee94837a4d94cca37c88525f694357aa0

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

require 'spec_helper'

describe Popolo::OrganizationsController do
  before :each do
    @routes = Popolo::Engine.routes
    @organization  = FactoryGirl.create :organization
  end

  describe 'GET index' do
    it 'assigns all organizations as @organizations' do
      get :index
      assigns(:organizations).to_a.should == [@organization]
      response.should be_success
    end
  end

  describe 'GET show' do
    it 'assigns the requested organization as @organization' do
      get :show, id: @organization.id.to_s
      assigns(:organization).should == @organization
      response.should be_success
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
popolo-0.0.3 spec/controllers/popolo/organizations_controller_spec.rb