0
0
Fork 0

Writing out more tests, fixed some bugs

This commit is contained in:
Eugen Rochko 2016-03-20 13:03:06 +01:00
parent e14b76c7cb
commit b640f35621
23 changed files with 1069 additions and 41 deletions

View file

@ -1,3 +0,0 @@
// Place all the styles related to the Api::Accounts controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -1,3 +0,0 @@
// Place all the styles related to the API::Follows controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -1,3 +0,0 @@
// Place all the styles related to the API::Salmon controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -1,3 +0,0 @@
// Place all the styles related to the API::Statuses controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -1,3 +0,0 @@
// Place all the styles related to the API::Subscriptions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -1,12 +1,3 @@
$primary-color: #ff7473;
$secondary-color: #ffc952;
$tertiary-color: #47b8e0;
$quaternary-color: #34314c;
$background-color: #fff;
$darker-background-color: #e3dede;
$text-color: #333030;
$lighter-text-color: #8b8687;
@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,400italic);
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,500);
@import "font-awesome";

View file

@ -1,3 +0,0 @@
// Place all the styles related to the oauth::applications controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -12,7 +12,7 @@ class Api::SubscriptionsController < ApiController
def update
body = request.body.read
if @account.subscription(api_subscription_url(@account.id)).verify(body, env['HTTP_X_HUB_SIGNATURE'])
if @account.subscription(api_subscription_url(@account.id)).verify(body, request.headers['HTTP_X_HUB_SIGNATURE'])
ProcessFeedService.new.(body, @account)
render nothing: true, status: 201
else

View file

@ -1,5 +1,6 @@
class ApiController < ApplicationController
protect_from_forgery with: :null_session
skip_before_filter :verify_authenticity_token
protected

View file

@ -17,7 +17,7 @@ class ProcessFeedService < BaseService
status = Status.find_by(uri: activity_id(entry))
# If we already have a post and the verb is now "delete", we gotta delete it and move on!
if verb(entry) == :delete
if !status.nil? && verb(entry) == :delete
delete_post!(status)
next
end