Skip to content

Commit

Permalink
chore: run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamu committed Aug 23, 2023
1 parent 4d2b7e3 commit fb8e6d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
5 changes: 3 additions & 2 deletions packages/bindings/src/mocks/mock_queriers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ fn register_default_mock_queries(querier: &mut MockDesmosQuerier) {
{
use crate::posts::mocks::MockPostsQueries;
use crate::posts::types::{
QueryPollAnswersRequest, QueryPostAttachmentsRequest, QueryPostRequest,
QuerySectionPostsRequest, QuerySubspacePostsRequest, QueryIncomingPostOwnerTransferRequestsRequest,
QueryIncomingPostOwnerTransferRequestsRequest, QueryPollAnswersRequest,
QueryPostAttachmentsRequest, QueryPostRequest, QuerySectionPostsRequest,
QuerySubspacePostsRequest,
};

QuerySubspacePostsRequest::mock_response(
Expand Down
14 changes: 8 additions & 6 deletions packages/bindings/src/posts/mocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
use crate::cosmos_types::Timestamp;
use crate::posts::types::AttachmentContent;
use crate::posts::types::{
Attachment, Media, Post, QueryPollAnswersResponse, QueryPostAttachmentsResponse,
QueryPostResponse, QuerySectionPostsResponse, QuerySubspacePostsResponse, ReplySetting,
UserAnswer, QueryIncomingPostOwnerTransferRequestsResponse, PostOwnerTransferRequest,
Attachment, Media, Post, PostOwnerTransferRequest,
QueryIncomingPostOwnerTransferRequestsResponse, QueryPollAnswersResponse,
QueryPostAttachmentsResponse, QueryPostResponse, QuerySectionPostsResponse,
QuerySubspacePostsResponse, ReplySetting, UserAnswer,
};

use chrono::DateTime;
Expand Down Expand Up @@ -142,13 +143,14 @@ impl MockPostsQueries {
}

/// Function that mocks a [`QueryIncomingPostOwnerTransferRequestsResponse`].
pub fn get_mocked_incoming_post_transfer_requests_response() -> QueryIncomingPostOwnerTransferRequestsResponse {
pub fn get_mocked_incoming_post_transfer_requests_response(
) -> QueryIncomingPostOwnerTransferRequestsResponse {
QueryIncomingPostOwnerTransferRequestsResponse {
requests: vec![PostOwnerTransferRequest{
requests: vec![PostOwnerTransferRequest {
subspace_id: 1,
post_id: 1,
sender: "sender".into(),
receiver: "receiver".into()
receiver: "receiver".into(),
}],
pagination: None,
}
Expand Down
12 changes: 2 additions & 10 deletions packages/bindings/src/posts/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,7 @@ mod tests {

#[test]
fn test_accept_post_owner_transfer_request() {
let msg = PostsMsg::accept_post_owner_transfer_request(
1,
1,
Addr::unchecked("receiver"),
);
let msg = PostsMsg::accept_post_owner_transfer_request(1, 1, Addr::unchecked("receiver"));

let expected = MsgAcceptPostOwnerTransferRequest {
subspace_id: 1,
Expand All @@ -491,11 +487,7 @@ mod tests {

#[test]
fn test_refuse_post_owner_transfer_request() {
let msg = PostsMsg::refuse_post_owner_transfer_request(
1,
1,
Addr::unchecked("receiver"),
);
let msg = PostsMsg::refuse_post_owner_transfer_request(1, 1, Addr::unchecked("receiver"));

let expected = MsgRefusePostOwnerTransferRequest {
subspace_id: 1,
Expand Down

0 comments on commit fb8e6d7

Please sign in to comment.