Skip to content

Commit

Permalink
Fix broken Linux tests
Browse files Browse the repository at this point in the history
  • Loading branch information
filipetoscano committed Feb 10, 2025
1 parent 2dd21f7 commit 4c362d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Resend.Tests/EmailAttachmentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public class EmailAttachmentTests
[Fact]
public void FromOk()
{
var path = Path.Combine( AppContext.BaseDirectory, @"..\\..\\..\\", "EmailAttachmentTests.cs" );
var relPath = OperatingSystem.IsWindows() == true ? @"..\\..\\..\\" : "../../../";
var path = Path.Combine( AppContext.BaseDirectory, relPath, "EmailAttachmentTests.cs" );
var size = new FileInfo( path ).Length;

var attach = EmailAttachment.From( path );
Expand Down Expand Up @@ -66,7 +67,8 @@ public async Task FromAsyncOk()
[Fact]
public void FromAsyncNotFound()
{
var path = Path.Combine( AppContext.BaseDirectory, @"..\\..\\..\\", "NOTFOUND.cs" );
var relPath = OperatingSystem.IsWindows() == true ? @"..\\..\\..\\" : "../../../";
var path = Path.Combine( AppContext.BaseDirectory, relPath, "NOTFOUND.cs" );

Action act = () => EmailAttachment.FromAsync( path ).GetAwaiter().GetResult();

Expand Down

0 comments on commit 4c362d9

Please sign in to comment.