From 979adca1e74fb25396f9bfbbbf05c50ced863aa7 Mon Sep 17 00:00:00 2001 From: theworldbright Date: Sat, 25 Jul 2015 15:44:34 +0900 Subject: [PATCH] Fix account deleter specs Squashed commits: [7ff4276] Adjust discovery controller --- app/controllers/openid_connect/discovery_controller.rb | 4 ++-- app/models/user.rb | 1 - db/schema.rb | 2 +- lib/account_deleter.rb | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/openid_connect/discovery_controller.rb b/app/controllers/openid_connect/discovery_controller.rb index a11207b8d..8ed066e06 100644 --- a/app/controllers/openid_connect/discovery_controller.rb +++ b/app/controllers/openid_connect/discovery_controller.rb @@ -18,8 +18,8 @@ class OpenidConnect::DiscoveryController < ApplicationController token_endpoint: openid_connect_access_tokens_url, userinfo_endpoint: api_v0_user_url, jwks_uri: File.join(root_url, "openid_connect", "jwks.json"), - scopes_supported: Scope.pluck(:name), - response_types_supported: OAuthApplication.available_response_types, + scopes_supported: OpenidConnect::Scope.pluck(:name), + response_types_supported: OpenidConnect::OAuthApplication.available_response_types, request_object_signing_alg_values_supported: %i(HS256 HS384 HS512), subject_types_supported: %w(public pairwise), id_token_signing_alg_values_supported: %i(RS256), diff --git a/app/models/user.rb b/app/models/user.rb index c77a75e1c..9c4927161 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -78,7 +78,6 @@ class User < ActiveRecord::Base has_many :authorizations, class_name: "OpenidConnect::Authorization" has_many :o_auth_applications, through: :authorizations, class_name: "OpenidConnect::OAuthApplication" - has_many :o_auth_access_tokens, through: :authorizations, class_name: "OpenidConnect::OAuthAccessToken" before_save :guard_unconfirmed_email, :save_person! diff --git a/db/schema.rb b/db/schema.rb index 0b6547dbc..679036156 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150714055110) do +ActiveRecord::Schema.define(version: 20150724152052) do create_table "account_deletions", force: :cascade do |t| t.string "diaspora_handle", limit: 255 diff --git a/lib/account_deleter.rb b/lib/account_deleter.rb index c102cb6c0..10dee342e 100644 --- a/lib/account_deleter.rb +++ b/lib/account_deleter.rb @@ -47,7 +47,7 @@ class AccountDeleter #user deletions def normal_ar_user_associates_to_delete %i(tag_followings invitations_to_me services aspects user_preferences - notifications blocks authorizations o_auth_applications o_auth_access_tokens id_tokens) + notifications blocks authorizations o_auth_applications) end def special_ar_user_associations