Sha256: 114bbb02754f976f4ef13ee51319c6bb3eabd8b5c7eaff85f18cd8624d2c18e9
Contents?: true
Size: 664 Bytes
Versions: 6
Compression:
Stored size: 664 Bytes
Contents
require 'spec_helper' # Tests the automatic usage of `current_user` as the `whodunnit` attribute on the draft object describe WhodunnitsController do let(:trashable) { Trashable.create!(:name => 'Bob') } describe :create do before { post :create } subject { Draftsman::Draft.last } its(:whodunnit) { should eql "153" } end describe :update do before { put :update, :id => trashable.id } subject { Draftsman::Draft.last } its(:whodunnit) { should eql "153" } end describe :destroy do before { delete :destroy, :id => trashable.id } subject { Draftsman::Draft.last } its(:whodunnit) { should eql "153" } end end
Version data entries
6 entries across 6 versions & 1 rubygems