Tests now pass, stream_element needs de-hacking
This commit is contained in:
parent
c8e31825c5
commit
e7095ba788
4 changed files with 8 additions and 2 deletions
|
|
@ -32,5 +32,7 @@ class ActivityStreams::Photo < Post
|
||||||
:actor_url => json["actor"]["url"]
|
:actor_url => json["actor"]["url"]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def activity_streams?; true; end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
= person_link(post.author, :class => 'author')
|
= person_link(post.author, :class => 'author')
|
||||||
%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 post.model.instance_of?(ActivityStreams::Photo)
|
- if post.respond_to?(:activity_streams?)
|
||||||
= image_tag post.image_url
|
= image_tag post.image_url
|
||||||
- else
|
- else
|
||||||
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
.from
|
.from
|
||||||
= person_link(post.author)
|
= person_link(post.author)
|
||||||
|
|
||||||
- if post.model.instance_of?(ActivityStreams::Photo)
|
- if post.respond_to?(:activity_streams?)
|
||||||
= image_tag post.image_url
|
= image_tag post.image_url
|
||||||
- else
|
- else
|
||||||
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,10 @@ describe UsersController do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#generate_new_token' do
|
describe '#generate_new_token' do
|
||||||
|
before do
|
||||||
|
AppConfig[:admins] = [@user.username]
|
||||||
|
end
|
||||||
|
|
||||||
it 'generates a new token for the current user' do
|
it 'generates a new token for the current user' do
|
||||||
lambda {
|
lambda {
|
||||||
get 'generate_new_token'
|
get 'generate_new_token'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue