specs green

This commit is contained in:
Daniel Grippi 2011-11-30 09:56:47 -08:00
parent 682d45d9bd
commit cec1f09202
5 changed files with 18 additions and 13 deletions

View file

@ -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)

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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)