fixed the build
This commit is contained in:
parent
88aa67dba7
commit
177cc16e2f
2 changed files with 21 additions and 5 deletions
|
|
@ -44,10 +44,10 @@ class UsersController < ApplicationController
|
||||||
else
|
else
|
||||||
flash[:error] = I18n.t 'users.update.language_not_changed'
|
flash[:error] = I18n.t 'users.update.language_not_changed'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
redirect_to edit_user_path(@user)
|
redirect_to edit_user_path(@user)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
current_user.destroy
|
current_user.destroy
|
||||||
|
|
|
||||||
|
|
@ -105,11 +105,27 @@ describe User do
|
||||||
user.dispatch_post(status, :to => "all")
|
user.dispatch_post(status, :to => "all")
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'includes a permalink to my post' do
|
it 'does not include a permalink' do
|
||||||
@status_opts[:public] = true
|
@status_opts[:public] = true
|
||||||
status.save
|
status.save
|
||||||
user.should_receive(:post_to_twitter).with(service1, @message+ " #{post_path(status)}").once
|
user.should_receive(:post_to_twitter).with(service1, @message).once
|
||||||
user.should_receive(:post_to_facebook).with(service2, @message + " #{post_path(status)}").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))
|
user.dispatch_post(status, :to => "all", :url => post_path(status))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue