fixed all specs; rebased.
This commit is contained in:
parent
ce94779766
commit
d1bbbdbc4c
7 changed files with 20 additions and 23 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
.span-20.append-2.prepend-2.last
|
.span-20.append-2.prepend-2.last
|
||||||
#main_stream.stream.status_message_show
|
#main_stream.stream.status_message_show
|
||||||
= render 'shared/stream_element', :post => @post, :all_aspects => @post.aspects
|
= render 'shared/stream_element_shim', :post => @post, :commenting_disabled => defined?(@commenting_disabled)
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,7 @@
|
||||||
= link_to image_tag('deletelabel.png'), post_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete stream_element_delete", :title => t('delete')
|
= link_to image_tag('deletelabel.png'), post_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete stream_element_delete", :title => t('delete')
|
||||||
|
|
||||||
- else
|
- else
|
||||||
.right
|
.right.controls
|
||||||
- if reshare
|
|
||||||
.reshare_attribution= "reshared by #{reshare.author.name}"
|
|
||||||
.controls
|
|
||||||
= link_to image_tag('deletelabel.png'), post_visibility_path(:id => "42", :post_id => post.id), :method => :put, :remote => true, :class => "delete stream_element_delete", :title => t('hide')
|
= link_to image_tag('deletelabel.png'), post_visibility_path(:id => "42", :post_id => post.id), :method => :put, :remote => true, :class => "delete stream_element_delete", :title => t('hide')
|
||||||
.undo_text.hidden
|
.undo_text.hidden
|
||||||
= t('post_visibilites.update.post_hidden', :name => post.author.name)
|
= t('post_visibilites.update.post_hidden', :name => post.author.name)
|
||||||
|
|
@ -27,6 +24,10 @@
|
||||||
%span.from
|
%span.from
|
||||||
= person_link(post.author, :class => 'hovercardable')
|
= person_link(post.author, :class => 'hovercardable')
|
||||||
%time.time.timeago{:datetime => post.created_at, :integer => time_for_sort(post).to_i}
|
%time.time.timeago{:datetime => post.created_at, :integer => time_for_sort(post).to_i}
|
||||||
|
- if reshare
|
||||||
|
%span.reshared
|
||||||
|
= "reshared by"
|
||||||
|
= person_link(reshare.author, :class => "hovercardable")
|
||||||
%span.details
|
%span.details
|
||||||
–
|
–
|
||||||
%span.timeago
|
%span.timeago
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
-if (defined?(post.model) && post.model.is_a?(Reshare)) || post.instance_of?(Reshare)
|
||||||
-if post.model.is_a?(Reshare)
|
= render 'shared/stream_element', :post => post.root, :commenting_disabled => commenting_disabled, :reshare => post
|
||||||
= render 'shared/stream_element', :post => post.root, :all_aspects => all_aspects, :commenting_disabled => commenting_disabled, :reshare => post
|
|
||||||
- else
|
- else
|
||||||
= render 'shared/stream_element', :post => post, :all_aspects => all_aspects, :commenting_disabled => commenting_disabled, :reshare => nil
|
= render 'shared/stream_element', :post => post, :commenting_disabled => commenting_disabled, :reshare => nil
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,7 @@ ActiveRecord::Schema.define(:version => 20110707234802) do
|
||||||
t.string "provider_display_name"
|
t.string "provider_display_name"
|
||||||
t.string "actor_url"
|
t.string "actor_url"
|
||||||
t.integer "objectId"
|
t.integer "objectId"
|
||||||
|
t.integer "root_id"
|
||||||
t.string "status_message_guid"
|
t.string "status_message_guid"
|
||||||
t.integer "likes_count", :default => 0
|
t.integer "likes_count", :default => 0
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,14 @@ Feature: public repost
|
||||||
Scenario: shows up on the profile page
|
Scenario: shows up on the profile page
|
||||||
And "bob@bob.bob" has a public post with text "reshare this!"
|
And "bob@bob.bob" has a public post with text "reshare this!"
|
||||||
And I sign in as "alice@alice.alice"
|
And I sign in as "alice@alice.alice"
|
||||||
|
|
||||||
And I preemptively confirm the alert
|
And I preemptively confirm the alert
|
||||||
And I follow "Reshare"
|
And I follow "Reshare"
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
|
And I wait for 2 seconds
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Then I should see a ".reshared"
|
|
||||||
And I am on "alice@alice.alice"'s page
|
And I am on "alice@alice.alice"'s page
|
||||||
Then I should see "reshare this!"
|
Then I should see "reshare this!"
|
||||||
Then I should see a ".reshared"
|
Then I should see a ".reshared"
|
||||||
|
|
@ -45,8 +48,9 @@ Feature: public repost
|
||||||
And I follow "Reshare"
|
And I follow "Reshare"
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
|
|
||||||
|
And I go to the home page
|
||||||
Then I should see a ".reshared"
|
Then I should see a ".reshared"
|
||||||
And I follow "All Aspects"
|
And I follow "Your Aspects"
|
||||||
Then I should see "reshare this!"
|
Then I should see "reshare this!"
|
||||||
Then I should see a ".reshared"
|
Then I should see a ".reshared"
|
||||||
And I should see "Bob"
|
And I should see "Bob"
|
||||||
|
|
|
||||||
|
|
@ -376,10 +376,6 @@ ul.as-selections
|
||||||
&:hover
|
&:hover
|
||||||
:text
|
:text
|
||||||
:decoration none
|
:decoration none
|
||||||
.reshare_attribution
|
|
||||||
:font-size smaller
|
|
||||||
.reshared
|
|
||||||
:background-color #eee
|
|
||||||
|
|
||||||
.stream_element
|
.stream_element
|
||||||
:position relative
|
:position relative
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,13 @@ require 'spec_helper'
|
||||||
describe ResharesController do
|
describe ResharesController do
|
||||||
|
|
||||||
describe '#create' do
|
describe '#create' do
|
||||||
|
|
||||||
it 'requires authentication' do
|
it 'requires authentication' do
|
||||||
post :create, :format => :js
|
post :create, :format => :js
|
||||||
response.should_not be_success
|
response.should_not be_success
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with an authenticated user' do
|
context 'with an authenticated user' do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
||||||
sign_in :user, bob
|
sign_in :user, bob
|
||||||
@post_id = Factory(:status_message, :public => true).id
|
@post_id = Factory(:status_message, :public => true).id
|
||||||
@controller.stub(:current_user).and_return(bob)
|
@controller.stub(:current_user).and_return(bob)
|
||||||
|
|
@ -19,7 +16,6 @@ describe ResharesController do
|
||||||
|
|
||||||
it 'succeeds' do
|
it 'succeeds' do
|
||||||
post :create, :format => :js, :root_id => @post_id
|
post :create, :format => :js, :root_id => @post_id
|
||||||
puts response.code
|
|
||||||
response.should be_success
|
response.should be_success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue