Sha256: a1529f6b955d0e6d6eea8a91d8c884519bbe75c95abfda9820197813d3855b36
Contents?: true
Size: 636 Bytes
Versions: 2
Compression:
Stored size: 636 Bytes
Contents
require 'rails_helper' module Popolo RSpec.describe OrganizationsController, type: :controller do routes { Engine.routes } before :each do @organization = FactoryGirl.create(:organization) end describe 'GET index' do it 'assigns all organizations as @organizations' do get :index, {} expect(assigns(:organizations)).to eq([@organization]) end end describe 'GET show' do it 'assigns the requested organization as @organization' do get :show, {id: @organization.to_param} expect(assigns(:organization)).to eq(@organization) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
popolo-0.1.1 | spec/controllers/popolo/organizations_controller_spec.rb |
popolo-0.1.0 | spec/controllers/popolo/organizations_controller_spec.rb |