Skip to content

Commit

Permalink
Fix FollowRecord to have correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
drasticactions committed Jan 9, 2024
1 parent 266dff9 commit 4a361c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/FishyFlip.Tests/AuthorizedTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) Drastic Actions. All rights reserved.
// </copyright>

using FishyFlip.Models;
using Microsoft.Extensions.Logging.Debug;

namespace FishyFlip.Tests;
Expand Down Expand Up @@ -325,4 +326,12 @@ public async Task CreatePostWithTagAsyncTest()
var test = (await this.proto.Repo.CreatePostAsync(prompt, new[] { facet }, null, new[] { "en" })).HandleResult();
Assert.True(test!.Cid is not null);
}

[Fact]
public async Task CreateFollowAsyncTest()
{
// Did is for follow1.drasticactions.ninja.
var response = (await this.proto.Repo.CreateFollowAsync(ATDid.Create("did:plc:up76ybimufzledmmhbv25wse"))).HandleResult();
Assert.True(response!.Cid is not null);
}
}
2 changes: 1 addition & 1 deletion src/FishyFlip/Models/FollowRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public FollowRecord(ATDid? subject, DateTime? createdAt)
{
this.Subject = subject;
this.CreatedAt = createdAt ?? DateTime.Now;
this.Type = Constants.GraphTypes.Block;
this.Type = Constants.GraphTypes.Follow;
}

public ATDid? Subject { get; }
Expand Down

0 comments on commit 4a361c9

Please sign in to comment.