From cec1f09202424c08478e395d56e2053c32a2b871 Mon Sep 17 00:00:00 2001 From: Daniel Grippi Date: Wed, 30 Nov 2011 09:56:47 -0800 Subject: [PATCH] specs green --- app/controllers/services_controller.rb | 2 +- db/schema.rb | 22 +++++++++---------- .../like_stream_controller_spec.rb | 4 ++++ spec/controllers/services_controller_spec.rb | 2 +- spec/lib/diaspora/ostatus_builder_spec.rb | 1 + 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 8aedb6ed8..0ccb00bb8 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -101,7 +101,7 @@ class ServicesController < ApplicationController \n #{accept_invitation_url(user, :invitation_token => user.invitation_token)} MSG - "http://www.facebook.com/messages/#{facebook_uid}?msg_prefill=#{message}" + "https://www.facebook.com/messages/#{facebook_uid}?msg_prefill=#{message}" end def invite_redirect_json(invite, user, service_user) diff --git a/db/schema.rb b/db/schema.rb index 63a1b222d..4a3992302 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,3 @@ -# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -54,17 +53,17 @@ ActiveRecord::Schema.define(:version => 20111101202137) do end create_table "comments", :force => true do |t| - t.text "text", :null => false - t.integer "commentable_id", :null => false - t.integer "author_id", :null => false - t.string "guid", :null => false + t.text "text", :null => false + t.integer "commentable_id", :null => false + t.integer "author_id", :null => false + t.string "guid", :null => false t.text "author_signature" t.text "parent_author_signature" t.text "youtube_titles" t.datetime "created_at" t.datetime "updated_at" - t.integer "likes_count", :default => 0, :null => false - t.string "commentable_type", :default => "Post", :null => false + t.integer "likes_count", :default => 0, :null => false + t.string "commentable_type", :limit => 60, :default => "Post", :null => false end add_index "comments", ["author_id"], :name => "index_comments_on_person_id" @@ -253,6 +252,7 @@ ActiveRecord::Schema.define(:version => 20111101202137) do add_index "people", ["owner_id"], :name => "index_people_on_owner_id", :unique => true create_table "photos", :force => true do |t| + t.integer "tmp_old_id" t.integer "author_id", :null => false t.boolean "public", :default => false, :null => false t.string "diaspora_handle" @@ -371,12 +371,12 @@ ActiveRecord::Schema.define(:version => 20111101202137) do add_index "services", ["user_id"], :name => "index_services_on_user_id" create_table "share_visibilities", :force => true do |t| - t.integer "shareable_id", :null => false + t.integer "shareable_id", :null => false t.datetime "created_at" t.datetime "updated_at" - t.boolean "hidden", :default => false, :null => false - t.integer "contact_id", :null => false - t.string "shareable_type", :default => "Post", :null => false + t.boolean "hidden", :default => false, :null => false + t.integer "contact_id", :null => false + t.string "shareable_type", :limit => 60, :default => "Post", :null => false end add_index "share_visibilities", ["contact_id"], :name => "index_post_visibilities_on_contact_id" diff --git a/spec/controllers/like_stream_controller_spec.rb b/spec/controllers/like_stream_controller_spec.rb index f013487be..9dfddce4d 100644 --- a/spec/controllers/like_stream_controller_spec.rb +++ b/spec/controllers/like_stream_controller_spec.rb @@ -5,6 +5,10 @@ require 'spec_helper' describe LikeStreamController do + before do + sign_in :user, alice + end + describe 'index' do it 'succeeds' do get :index diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index f2c371276..e361ab8c7 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -157,7 +157,7 @@ describe ServicesController do it 'redirects to a prefilled facebook message url' do put :inviter, @invite_params - response.location.should match(/https:\/\/www\.facebook\.com\/\?compose=1&id=.*&subject=.*&message=.*&sk=messages/) + response.location.should match(/https:\/\/www\.facebook\.com\/messages\/.*?msg_prefill=.*/) end it 'creates an invitation' do diff --git a/spec/lib/diaspora/ostatus_builder_spec.rb b/spec/lib/diaspora/ostatus_builder_spec.rb index 2ef86f8c1..df990f8b5 100644 --- a/spec/lib/diaspora/ostatus_builder_spec.rb +++ b/spec/lib/diaspora/ostatus_builder_spec.rb @@ -9,6 +9,7 @@ require 'nokogiri/xml' describe Diaspora::OstatusBuilder do before do + pending @aspect = alice.aspects.first @public_status_messages = 3.times.inject([]) do |arr,n| s = alice.post(:status_message, :text => "hey#{n}", :public => true, :to => @aspect.id)