updated routes to reflect page titles (explore/participate)
This commit is contained in:
parent
8fb3ad710f
commit
84eb313e20
32 changed files with 45 additions and 46 deletions
|
|
@ -88,7 +88,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def redirect_unless_admin
|
def redirect_unless_admin
|
||||||
unless current_user.admin?
|
unless current_user.admin?
|
||||||
redirect_to multi_stream_url, :notice => 'you need to be an admin to do that'
|
redirect_to explore_url, :notice => 'you need to be an admin to do that'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -116,7 +116,7 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_sign_in_path_for(resource)
|
def after_sign_in_path_for(resource)
|
||||||
stored_location_for(:user) || (current_user.getting_started? ? getting_started_path : multi_stream_path)
|
stored_location_for(:user) || (current_user.getting_started? ? getting_started_path : explore_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def max_time
|
def max_time
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class HomeController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if current_user
|
if current_user
|
||||||
redirect_to multi_stream_path if current_user
|
redirect_to explore_path if current_user
|
||||||
elsif is_mobile_device?
|
elsif is_mobile_device?
|
||||||
redirect_to user_session_path
|
redirect_to user_session_path
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class NotificationsController < ApplicationController
|
||||||
def read_all
|
def read_all
|
||||||
Notification.where(:recipient_id => current_user.id).update_all(:unread => false)
|
Notification.where(:recipient_id => current_user.id).update_all(:unread => false)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to multi_stream_path }
|
format.html { redirect_to explore_path }
|
||||||
format.xml { render :xml => {}.to_xml }
|
format.xml { render :xml => {}.to_xml }
|
||||||
format.json { render :json => {}.to_json }
|
format.json { render :json => {}.to_json }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class PostsController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js {render 'destroy'}
|
format.js {render 'destroy'}
|
||||||
format.json { render :nothing => true, :status => 204 }
|
format.json { render :nothing => true, :status => 204 }
|
||||||
format.all {redirect_to multi_stream_path}
|
format.all {redirect_to explore_path}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"
|
Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class StatusMessagesController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to :back}
|
format.html { redirect_to :back}
|
||||||
format.mobile{ redirect_to multi_stream_path}
|
format.mobile{ redirect_to explore_path}
|
||||||
format.json{ render :json => @status_message.as_api_response(:backbone), :status => 201 }
|
format.json{ render :json => @status_message.as_api_response(:backbone), :status => 201 }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,6 @@ class TagFollowingsController < ApplicationController
|
||||||
@tag_following = current_user.tag_followings.create(:tag_id => @tag.id)
|
@tag_following = current_user.tag_followings.create(:tag_id => @tag.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to multi_stream_path
|
redirect_to explore_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class UsersController < ApplicationController
|
||||||
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
|
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
|
||||||
current_user.close_account!
|
current_user.close_account!
|
||||||
sign_out current_user
|
sign_out current_user
|
||||||
redirect_to(multi_stream_path, :notice => I18n.t('users.destroy.success'))
|
redirect_to(explore_path, :notice => I18n.t('users.destroy.success'))
|
||||||
else
|
else
|
||||||
if params[:user].present? && params[:user][:current_password].present?
|
if params[:user].present? && params[:user][:current_password].present?
|
||||||
flash[:error] = t 'users.destroy.wrong_password'
|
flash[:error] = t 'users.destroy.wrong_password'
|
||||||
|
|
@ -111,7 +111,7 @@ class UsersController < ApplicationController
|
||||||
format.any { redirect_to person_path(user.person) }
|
format.any { redirect_to person_path(user.person) }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
redirect_to multi_stream_path, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
|
redirect_to explore_path, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -127,14 +127,14 @@ class UsersController < ApplicationController
|
||||||
def logged_out
|
def logged_out
|
||||||
@page = :logged_out
|
@page = :logged_out
|
||||||
if user_signed_in?
|
if user_signed_in?
|
||||||
redirect_to multi_stream_path
|
redirect_to explore_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def getting_started_completed
|
def getting_started_completed
|
||||||
user = current_user
|
user = current_user
|
||||||
user.update_attributes(:getting_started => false)
|
user.update_attributes(:getting_started => false)
|
||||||
redirect_to multi_stream_path
|
redirect_to explore_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def export
|
def export
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ module StreamHelper
|
||||||
elsif controller.instance_of?(PostsController)
|
elsif controller.instance_of?(PostsController)
|
||||||
public_stream_path(:max_time => time_for_scroll(@stream))
|
public_stream_path(:max_time => time_for_scroll(@stream))
|
||||||
elsif controller.instance_of?(StreamsController)
|
elsif controller.instance_of?(StreamsController)
|
||||||
multi_stream_path(:max_time => time_for_scroll(@stream))
|
explore_path(:max_time => time_for_scroll(@stream))
|
||||||
else
|
else
|
||||||
raise 'in order to use pagination for this new controller, update next_page_path in stream helper'
|
raise 'in order to use pagination for this new controller, update next_page_path in stream helper'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
.navbar.navbar-fixed-top
|
.navbar.navbar-fixed-top
|
||||||
.navbar-inner
|
.navbar-inner
|
||||||
.container{:style => "position: relative;"}
|
.container{:style => "position: relative;"}
|
||||||
= link_to(image_tag('header-logo2x.png', :height => 40, :width => 40, :id => 'header_title'), multi_stream_path)
|
= link_to(image_tag('header-logo2x.png', :height => 40, :width => 40, :id => 'header_title'), explore_path)
|
||||||
|
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
.right
|
.right
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
.section
|
.section
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
= link_to t("streams.multi.title"), multi_stream_path, :class => 'home_selector', :rel => 'backbone'
|
= link_to t("streams.multi.title"), explore_path, :class => 'home_selector', :rel => 'backbone'
|
||||||
|
|
||||||
= render 'aspects/aspect_listings', :stream => @stream
|
= render 'aspects/aspect_listings', :stream => @stream
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
%br
|
%br
|
||||||
%ul.left_nav
|
%ul.left_nav
|
||||||
%li
|
%li
|
||||||
= link_to t("streams.participate.title"), participate_stream_path, :class => 'home_selector', :rel => 'backbone'
|
= link_to t("streams.participate.title"), participate_path, :class => 'home_selector', :rel => 'backbone'
|
||||||
|
|
||||||
%ul.left_nav.sub
|
%ul.left_nav.sub
|
||||||
%li
|
%li
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
%h4
|
%h4
|
||||||
= t('.simply_visit')
|
= t('.simply_visit')
|
||||||
%strong
|
%strong
|
||||||
= link_to AppConfig[:pod_url], multi_stream_path
|
= link_to AppConfig[:pod_url], explore_path
|
||||||
= t('.on_your_mobile_device')
|
= t('.on_your_mobile_device')
|
||||||
|
|
||||||
%p.dull
|
%p.dull
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ Diaspora::Application.routes.draw do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Streams
|
# Streams
|
||||||
get "participate" => "streams#participate", :as => "participate_stream"
|
get "participate" => "streams#participate", :as => "participate"
|
||||||
|
get "explore" => "streams#multi", :as => "explore"
|
||||||
get "public" => "streams#public", :as => "public_stream"
|
get "public" => "streams#public", :as => "public_stream"
|
||||||
get "stream" => "streams#multi", :as => "multi_stream"
|
|
||||||
get "followed_tags" => "streams#followed_tags", :as => "followed_tags_stream"
|
get "followed_tags" => "streams#followed_tags", :as => "followed_tags_stream"
|
||||||
get "mentions" => "streams#mentioned", :as => "mentioned_stream"
|
get "mentions" => "streams#mentioned", :as => "mentioned_stream"
|
||||||
get "liked" => "streams#liked", :as => "liked_stream"
|
get "liked" => "streams#liked", :as => "liked_stream"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ Feature: invitation acceptance
|
||||||
|
|
||||||
And I preemptively confirm the alert
|
And I preemptively confirm the alert
|
||||||
And I follow "awesome_button"
|
And I follow "awesome_button"
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
|
|
||||||
Scenario: accept invitation from user
|
Scenario: accept invitation from user
|
||||||
Given I have been invited by a user
|
Given I have been invited by a user
|
||||||
|
|
@ -34,7 +34,7 @@ Feature: invitation acceptance
|
||||||
|
|
||||||
And I preemptively confirm the alert
|
And I preemptively confirm the alert
|
||||||
And I follow "awesome_button"
|
And I follow "awesome_button"
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
|
|
||||||
Scenario: sends an invitation
|
Scenario: sends an invitation
|
||||||
Given a user with email "bob@bob.bob"
|
Given a user with email "bob@bob.bob"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Feature: Change password
|
||||||
Then I should see "Password changed"
|
Then I should see "Password changed"
|
||||||
Then I should be on the new user session page
|
Then I should be on the new user session page
|
||||||
When I sign in with password "newsecret"
|
When I sign in with password "newsecret"
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
|
|
||||||
Scenario: Reset my password
|
Scenario: Reset my password
|
||||||
Given a user with email "forgetful@users.net"
|
Given a user with email "forgetful@users.net"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Feature: user authentication
|
||||||
And I fill in "Username" with "ohai"
|
And I fill in "Username" with "ohai"
|
||||||
And I fill in "Password" with "secret"
|
And I fill in "Password" with "secret"
|
||||||
And I press "Sign in"
|
And I press "Sign in"
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: user logs out
|
Scenario: user logs out
|
||||||
|
|
@ -19,5 +19,5 @@ Feature: user authentication
|
||||||
Scenario: user uses token auth
|
Scenario: user uses token auth
|
||||||
Given a user with username "ohai" and password "secret"
|
Given a user with username "ohai" and password "secret"
|
||||||
When I post a photo with a token
|
When I post a photo with a token
|
||||||
And I go to the multi stream page
|
And I go to the explore page
|
||||||
Then I should be on the new user session page
|
Then I should be on the new user session page
|
||||||
|
|
|
||||||
|
|
@ -19,18 +19,18 @@ Feature: new user registration
|
||||||
And I preemptively confirm the alert
|
And I preemptively confirm the alert
|
||||||
And I follow "awesome_button"
|
And I follow "awesome_button"
|
||||||
|
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
And I should not see "awesome_button"
|
And I should not see "awesome_button"
|
||||||
|
|
||||||
Scenario: new user skips the setup wizard
|
Scenario: new user skips the setup wizard
|
||||||
When I preemptively confirm the alert
|
When I preemptively confirm the alert
|
||||||
And I follow "awesome_button"
|
And I follow "awesome_button"
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
|
|
||||||
Scenario: closing a popover clears getting started
|
Scenario: closing a popover clears getting started
|
||||||
When I preemptively confirm the alert
|
When I preemptively confirm the alert
|
||||||
And I follow "awesome_button"
|
And I follow "awesome_button"
|
||||||
Then I should be on the multi stream page
|
Then I should be on the explore page
|
||||||
And I have turned off jQuery effects
|
And I have turned off jQuery effects
|
||||||
And I wait for the popovers to appear
|
And I wait for the popovers to appear
|
||||||
And I click close on all the popovers
|
And I click close on all the popovers
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ module NavigationHelpers
|
||||||
def path_to(page_name)
|
def path_to(page_name)
|
||||||
case page_name
|
case page_name
|
||||||
when /^the home(?: )?page$/
|
when /^the home(?: )?page$/
|
||||||
multi_stream_path
|
explore_path
|
||||||
when /^step (\d)$/
|
when /^step (\d)$/
|
||||||
if $1.to_i == 1
|
if $1.to_i == 1
|
||||||
getting_started_path
|
getting_started_path
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ class Stream::Multi < Stream::Base
|
||||||
|
|
||||||
# @return [String] URL
|
# @return [String] URL
|
||||||
def link(opts)
|
def link(opts)
|
||||||
Rails.application.routes.url_helpers.multi_stream_path(opts)
|
Rails.application.routes.url_helpers.explore_path(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [String]
|
# @return [String]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
class Stream::Participate < Stream::Base
|
class Stream::Participate < Stream::Base
|
||||||
def link(opts={})
|
def link(opts={})
|
||||||
Rails.application.routes.url_helpers.participate_stream_path(opts)
|
Rails.application.routes.url_helpers.participate_path(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
def order
|
def order
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
app.Router = Backbone.Router.extend({
|
app.Router = Backbone.Router.extend({
|
||||||
routes: {
|
routes: {
|
||||||
"participate": "stream",
|
"participate": "stream",
|
||||||
"stream": "stream",
|
"explore": "stream",
|
||||||
"aspects:query": "stream",
|
"aspects:query": "stream",
|
||||||
"commented": "stream",
|
"commented": "stream",
|
||||||
"liked": "stream",
|
"liked": "stream",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="container" style="position:relative;">
|
<div class="container" style="position:relative;">
|
||||||
|
|
||||||
<a href="/stream">
|
<a href="/explore">
|
||||||
<img alt="Logo_small" class="diaspora_header_logo" height="38px" width="65px" src="{{imageUrl "/images/header-logo.png"}}" />
|
<img alt="Logo_small" class="diaspora_header_logo" height="38px" width="65px" src="{{imageUrl "/images/header-logo.png"}}" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<div id="nav_badges">
|
<div id="nav_badges">
|
||||||
<div class="badge" id="home_badge">
|
<div class="badge" id="home_badge">
|
||||||
<a href="/stream" title="{{t "header.home"}}"><img alt="Home" src="{{imageUrl "/images/icons/home_grey.png"}}" />
|
<a href="/explore" title="{{t "header.home"}}"><img alt="Home" src="{{imageUrl "/images/icons/home_grey.png"}}" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ var Publisher = {
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
console.log("OHHHHH MY GAWD")
|
|
||||||
Publisher.cachedForm = Publisher.cachedSubmit =
|
Publisher.cachedForm = Publisher.cachedSubmit =
|
||||||
Publisher.cachedInput = Publisher.cachedHiddenInput = false;
|
Publisher.cachedInput = Publisher.cachedHiddenInput = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ describe AdminsController do
|
||||||
context 'admin not signed in' do
|
context 'admin not signed in' do
|
||||||
it 'is behind redirect_unless_admin' do
|
it 'is behind redirect_unless_admin' do
|
||||||
get :user_search
|
get :user_search
|
||||||
response.should redirect_to multi_stream_path
|
response.should redirect_to explore_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ describe AdminsController do
|
||||||
context 'admin not signed in' do
|
context 'admin not signed in' do
|
||||||
it 'is behind redirect_unless_admin' do
|
it 'is behind redirect_unless_admin' do
|
||||||
get :admin_inviter
|
get :admin_inviter
|
||||||
response.should redirect_to multi_stream_path
|
response.should redirect_to explore_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ describe HomeController do
|
||||||
it 'redirects to multis index if user is logged in' do
|
it 'redirects to multis index if user is logged in' do
|
||||||
sign_in alice
|
sign_in alice
|
||||||
get :show, :home => true
|
get :show, :home => true
|
||||||
response.should redirect_to(multi_stream_path)
|
response.should redirect_to(explore_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ describe StreamsController do
|
||||||
sign_in :user, alice
|
sign_in :user, alice
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'generates the multi_stream_json fixture', :fixture => true do
|
it 'generates the explore_json fixture', :fixture => true do
|
||||||
posts = []
|
posts = []
|
||||||
|
|
||||||
time = Time.now
|
time = Time.now
|
||||||
|
|
@ -53,7 +53,7 @@ TXT
|
||||||
|
|
||||||
get :multi, :format => :json
|
get :multi, :format => :json
|
||||||
response.should be_success
|
response.should be_success
|
||||||
save_fixture(response.body, "multi_stream_json")
|
save_fixture(response.body, "explore_json")
|
||||||
|
|
||||||
Timecop.return
|
Timecop.return
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ describe NotificationsController do
|
||||||
it "should redirect to the stream in the html version" do
|
it "should redirect to the stream in the html version" do
|
||||||
Factory(:notification, :recipient => @user)
|
Factory(:notification, :recipient => @user)
|
||||||
get :read_all, :format => :html
|
get :read_all, :format => :html
|
||||||
response.should redirect_to(multi_stream_path)
|
response.should redirect_to(explore_path)
|
||||||
end
|
end
|
||||||
it "should return a dummy value in the json version" do
|
it "should return a dummy value in the json version" do
|
||||||
Factory(:notification, :recipient => @user)
|
Factory(:notification, :recipient => @user)
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ describe RegistrationsController do
|
||||||
it "redirects to the home path" do
|
it "redirects to the home path" do
|
||||||
get :create, @valid_params
|
get :create, @valid_params
|
||||||
response.should be_redirect
|
response.should be_redirect
|
||||||
response.location.should match /^#{multi_stream_url}\??$/
|
response.location.should match /^#{explore_url}\??$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,14 @@ describe SessionsController do
|
||||||
it "redirects to /stream for a non-mobile user" do
|
it "redirects to /stream for a non-mobile user" do
|
||||||
post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
|
post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
|
||||||
response.should be_redirect
|
response.should be_redirect
|
||||||
response.location.should match /^#{multi_stream_url}\??$/
|
response.location.should match /^#{explore_url}\??$/
|
||||||
end
|
end
|
||||||
|
|
||||||
it "redirects to /stream for a mobile user" do
|
it "redirects to /stream for a mobile user" do
|
||||||
@request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7'
|
@request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7'
|
||||||
post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
|
post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
|
||||||
response.should be_redirect
|
response.should be_redirect
|
||||||
response.location.should match /^#{multi_stream_url}\??$/
|
response.location.should match /^#{explore_url}\??$/
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'queues up an update job' do
|
it 'queues up an update job' do
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ describe("app.views.Feedback", function(){
|
||||||
'limited' : "Limted"
|
'limited' : "Limted"
|
||||||
}})
|
}})
|
||||||
|
|
||||||
var posts = $.parseJSON(spec.readFixture("multi_stream_json"))["posts"];
|
var posts = $.parseJSON(spec.readFixture("explore_json"))["posts"];
|
||||||
|
|
||||||
this.post = new app.models.Post(posts[0]);
|
this.post = new app.models.Post(posts[0]);
|
||||||
this.view = new app.views.Feedback({model: this.post});
|
this.view = new app.views.Feedback({model: this.post});
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ describe("app.views.LikesInfo", function(){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
var posts = $.parseJSON(spec.readFixture("multi_stream_json"))["posts"];
|
var posts = $.parseJSON(spec.readFixture("explore_json"))["posts"];
|
||||||
this.post = new app.models.Post(posts[0]); // post with a like
|
this.post = new app.models.Post(posts[0]); // post with a like
|
||||||
this.view = new app.views.LikesInfo({model: this.post});
|
this.view = new app.views.LikesInfo({model: this.post});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ describe("app.views.Post", function(){
|
||||||
}
|
}
|
||||||
}})
|
}})
|
||||||
|
|
||||||
var posts = $.parseJSON(spec.readFixture("multi_stream_json"))["posts"];
|
var posts = $.parseJSON(spec.readFixture("explore_json"))["posts"];
|
||||||
|
|
||||||
this.collection = new app.collections.Posts(posts);
|
this.collection = new app.collections.Posts(posts);
|
||||||
this.statusMessage = this.collection.models[0];
|
this.statusMessage = this.collection.models[0];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ describe("app.views.Stream", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
||||||
|
|
||||||
this.posts = $.parseJSON(spec.readFixture("multi_stream_json"))["posts"];
|
this.posts = $.parseJSON(spec.readFixture("explore_json"))["posts"];
|
||||||
|
|
||||||
this.stream = new app.models.Stream();
|
this.stream = new app.models.Stream();
|
||||||
this.stream.add(this.posts);
|
this.stream.add(this.posts);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue