fixed the build

This commit is contained in:
danielvincent 2010-12-04 14:25:56 -08:00
parent 88aa67dba7
commit 177cc16e2f
2 changed files with 21 additions and 5 deletions

View file

@ -44,10 +44,10 @@ class UsersController < ApplicationController
else
flash[:error] = I18n.t 'users.update.language_not_changed'
end
end
redirect_to edit_user_path(@user)
end
end
def destroy
current_user.destroy

View file

@ -105,11 +105,27 @@ describe User do
user.dispatch_post(status, :to => "all")
end
it 'includes a permalink to my post' do
it 'does not include a permalink' do
@status_opts[:public] = true
status.save
user.should_receive(:post_to_twitter).with(service1, @message+ " #{post_path(status)}").once
user.should_receive(:post_to_facebook).with(service2, @message + " #{post_path(status)}").once
user.should_receive(:post_to_twitter).with(service1, @message).once
user.should_receive(:post_to_facebook).with(service2, @message).once
user.dispatch_post(status, :to => "all", :url => post_path(status))
end
it 'includes a permalink' do
fixture_filename = 'button.png'
fixture_name = File.join(File.dirname(__FILE__), '..', '..', 'fixtures', fixture_filename)
photo1 = user.build_post(:photo, :user_file=> File.open(fixture_name), :to => aspect.id)
photo1.save!
@status_opts[:public] = true
@status_opts[:photo_id] = photo1.id
status.save
user.should_receive(:post_to_twitter).with(service1, @message).once
user.should_receive(:post_to_facebook).with(service2, @message).once
user.dispatch_post(status, :to => "all", :url => post_path(status))
end