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])
|
@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
|
raise 'MongoMapper failed to catch a failed save' unless @status_message.id
|
||||||
|
|
||||||
@status_message.photos += photos unless photos.nil?
|
@status_message.photos += photos unless photos.nil?
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ Given /^I have an aspect called "([^"]*)"$/ do |aspect_name|
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I have one contact request$/ do
|
Given /^I have one contact request$/ do
|
||||||
other_user = make_user
|
other_user = Factory(:user)
|
||||||
other_aspect = other_user.aspects.create!(:name => "meh")
|
other_aspect = other_user.aspects.create!(:name => "meh")
|
||||||
other_user.send_contact_request_to(@me.person, other_aspect)
|
other_user.send_contact_request_to(@me.person, other_aspect)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,7 @@ describe StatusMessagesController do
|
||||||
it "doesn't overwrite id" do
|
it "doesn't overwrite id" do
|
||||||
old_status_message = user1.post(:status_message, :message => "hello", :to => aspect1.id)
|
old_status_message = user1.post(:status_message, :message => "hello", :to => aspect1.id)
|
||||||
status_message_hash[:status_message][:id] = old_status_message.id
|
status_message_hash[:status_message][:id] = old_status_message.id
|
||||||
lambda {
|
|
||||||
post :create, status_message_hash
|
post :create, status_message_hash
|
||||||
}.should raise_error /failed save/
|
|
||||||
old_status_message.reload.message.should == 'hello'
|
old_status_message.reload.message.should == 'hello'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue