Skip to content

Commit

Permalink
Add GetList test
Browse files Browse the repository at this point in the history
  • Loading branch information
drasticactions committed Jan 15, 2024
1 parent 13e589c commit 07a0f28
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/FishyFlip.Tests/AuthorizedTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,23 @@ public async Task DescribeRepoTest()
Assert.True(describe.Did is not null);
Assert.True(describe.Did!.ToString() == repo.ToString());
}

[Fact]
public async Task GetListsTest()
{
var repo = this.proto.SessionManager!.Session!.Did;
var lists = (await this.proto.Graph.GetListsAsync(repo)).HandleResult();
Assert.True(lists is not null);
Assert.True(lists!.Lists.Count() > 0);
}

[Fact]
public async Task GetListTest()
{
var repo = ATUri.Create(@"at://did:plc:le7hm5ckuofqv7bd2t2hys2j/app.bsky.graph.list/3kizmyqkiq22h");
var lists = (await this.proto.Graph.GetListAsync(repo)).HandleResult();
Assert.True(lists is not null);
Assert.True(lists!.Cursor is not null);
Assert.True(lists!.Items.Count() > 0);
}
}
2 changes: 1 addition & 1 deletion src/FishyFlip/Models/ListView.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace FishyFlip.Models;

public record ListView(ATUri Uri, Cid Cid, string Name, string Purpose, string Description, Facet[]? DescriptionFacets, ActorProfile Creator, Viewer Viewer, DateTime IndexedAt);
public record ListView(ATUri Uri, Cid Cid, string Name, string Purpose, string Description, ActorProfile Creator, Viewer Viewer, DateTime IndexedAt);

public record ListViewRecord(ListView[] Lists, string? Cursor);

Expand Down

0 comments on commit 07a0f28

Please sign in to comment.