Fix a spec, need to move to a computer with firefox.
This commit is contained in:
parent
30d60021f4
commit
7175200779
3 changed files with 5 additions and 5 deletions
|
|
@ -22,7 +22,9 @@ class StatusMessagesController < ApplicationController
|
|||
@status_message = current_user.build_post(:status_message, params[:status_message])
|
||||
|
||||
|
||||
if photos || @status_message.save
|
||||
if !photos.empty? || @status_message.save
|
||||
pp photos
|
||||
pp @status_message
|
||||
raise 'MongoMapper failed to catch a failed save' unless @status_message.id
|
||||
|
||||
@status_message.photos += photos unless photos.nil?
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Given /^I have an aspect called "([^"]*)"$/ do |aspect_name|
|
|||
end
|
||||
|
||||
Given /^I have one contact request$/ do
|
||||
other_user = make_user
|
||||
other_user = Factory(:user)
|
||||
other_aspect = other_user.aspects.create!(:name => "meh")
|
||||
other_user.send_contact_request_to(@me.person, other_aspect)
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,7 @@ describe StatusMessagesController do
|
|||
it "doesn't overwrite id" do
|
||||
old_status_message = user1.post(:status_message, :message => "hello", :to => aspect1.id)
|
||||
status_message_hash[:status_message][:id] = old_status_message.id
|
||||
lambda {
|
||||
post :create, status_message_hash
|
||||
}.should raise_error /failed save/
|
||||
post :create, status_message_hash
|
||||
old_status_message.reload.message.should == 'hello'
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue