Move Identities to My::Identities
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
class IdentitiesController < ApplicationController
|
||||
class My::IdentitiesController < ApplicationController
|
||||
disallow_account_scope
|
||||
|
||||
def show
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
json.accounts @identity.users do |user|
|
||||
json.partial! "identities/account", account: user.account
|
||||
json.partial! "my/identities/account", account: user.account
|
||||
json.user do
|
||||
json.partial! "users/user", user: user
|
||||
end
|
||||
+1
-2
@@ -163,9 +163,8 @@ Rails.application.routes.draw do
|
||||
|
||||
resource :landing
|
||||
|
||||
resource :identity, only: :show
|
||||
|
||||
namespace :my do
|
||||
resource :identity, only: :show
|
||||
resources :access_tokens
|
||||
resources :pins
|
||||
resource :timezone
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
require "test_helper"
|
||||
|
||||
class IdentitiesControllerTest < ActionDispatch::IntegrationTest
|
||||
class My::IdentitiesControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
@@ -9,7 +9,7 @@ class IdentitiesControllerTest < ActionDispatch::IntegrationTest
|
||||
identity = identities(:kevin)
|
||||
|
||||
untenanted do
|
||||
get identity_path, as: :json
|
||||
get my_identity_path, as: :json
|
||||
assert_response :success
|
||||
assert_equal identity.accounts.count, @response.parsed_body["accounts"].count
|
||||
end
|
||||
Reference in New Issue
Block a user