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"]
|
||||
)
|
||||
end
|
||||
|
||||
def activity_streams?; true; end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
= person_link(post.author, :class => 'author')
|
||||
%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
|
||||
- else
|
||||
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
.from
|
||||
= person_link(post.author)
|
||||
|
||||
- if post.model.instance_of?(ActivityStreams::Photo)
|
||||
- if post.respond_to?(:activity_streams?)
|
||||
= image_tag post.image_url
|
||||
- else
|
||||
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
||||
|
|
|
|||
|
|
@ -140,6 +140,10 @@ describe UsersController do
|
|||
end
|
||||
|
||||
describe '#generate_new_token' do
|
||||
before do
|
||||
AppConfig[:admins] = [@user.username]
|
||||
end
|
||||
|
||||
it 'generates a new token for the current user' do
|
||||
lambda {
|
||||
get 'generate_new_token'
|
||||
|
|
|
|||
Loading…
Reference in a new issue