Fix code styles
This commit is contained in:
parent
e6fd043206
commit
b4dc13f1ce
10 changed files with 49 additions and 52 deletions
|
|
@ -31,7 +31,6 @@ module Api
|
|||
def comment_service
|
||||
@comment_service ||= CommentService.new(current_user)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ module Api
|
|||
aspect_ids
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -222,14 +222,14 @@ Rails.application.routes.draw do
|
|||
get "podmin", to: "home#podmin"
|
||||
|
||||
api_version(module: "Api::V0", path: {value: "api/v0"}, default: true) do
|
||||
match "user", to: "users#show", via: %i(get post)
|
||||
resources :posts, only: %i(show create destroy) do
|
||||
resources :comments, only: %i(create destroy)
|
||||
resources :likes, only: %i(create destroy)
|
||||
match "user", to: "users#show", via: %i[get post]
|
||||
resources :posts, only: %i[show create destroy] do
|
||||
resources :comments, only: %i[create destroy]
|
||||
resources :likes, only: %i[create destroy]
|
||||
end
|
||||
resources :conversations, only: %i(show index create destroy) do
|
||||
resources :conversations, only: %i[show index create destroy] do
|
||||
delete "visibility" => "conversation_visibilities#destroy"
|
||||
resources :messages, only: %i(index create)
|
||||
resources :messages, only: %i[index create]
|
||||
end
|
||||
get "activity" => "streams#activity", :as => "activity_stream"
|
||||
get "stream" => "streams#multi", :as => "stream"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ describe Api::V0::CommentsController do
|
|||
let!(:access_token) { auth.create_access_token.to_s }
|
||||
|
||||
before do
|
||||
@status = auth.user.post("Post",
|
||||
@status = auth.user.post(
|
||||
"Post",
|
||||
status_message: {text: "This is a status message"},
|
||||
public: true,
|
||||
to: "all",
|
||||
|
|
|
|||
|
|
@ -195,5 +195,4 @@ describe Api::V0::ConversationsController do
|
|||
def conversation_service
|
||||
ConversationService.new(alice)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -100,5 +100,4 @@ describe Api::V0::MessagesController do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ describe Api::V0::PostsController do
|
|||
aspect_ids: "public"
|
||||
}
|
||||
)
|
||||
expect(Post.find_by_text("Hello this is a public post!").public).to eq(true)
|
||||
expect(Post.find_by(text: "Hello this is a public post!").public).to eq(true)
|
||||
end
|
||||
|
||||
it "creates a private post" do
|
||||
response = post(
|
||||
post(
|
||||
api_v0_posts_path,
|
||||
params: {
|
||||
access_token: access_token_with_read_and_write,
|
||||
|
|
|
|||
Loading…
Reference in a new issue