Sha256: c2e416ec2a2429611422c835301c55e08fe90f3ca2cf9067aabfac802d4d354b

Contents?: true

Size: 748 Bytes

Versions: 6

Compression:

Stored size: 748 Bytes

Contents

require 'spec_helper'

# Tests controller `info_for_draftsman` method
describe InformantsController do
  let(:trashable) { Trashable.create!(:name => 'Bob') }

  describe :create do
    before { post :create }
    subject { Draftsman::Draft.last }
    its(:ip) { should eql '123.45.67.89' }
    its(:user_agent) { should eql '007' }
  end

  describe :update do
    before { put :update, :id => trashable.id }
    subject { Draftsman::Draft.last }
    its(:ip) { should eql '123.45.67.89' }
    its(:user_agent) { should eql '007' }
  end

  describe :destroy do
    before { delete :destroy, :id => trashable.id }
    subject { Draftsman::Draft.last }
    its(:ip) { should eql '123.45.67.89' }
    its(:user_agent) { should eql '007' }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
draftsman-0.3.1 spec/controllers/informants_controller_spec.rb
draftsman-0.3.0 spec/controllers/informants_controller_spec.rb
draftsman-0.2.1 spec/controllers/informants_controller_spec.rb
draftsman-0.2.0 spec/controllers/informants_controller_spec.rb
draftsman-0.1.1 spec/controllers/informants_controller_spec.rb
draftsman-0.1.0 spec/controllers/informants_controller_spec.rb