Skip to content

Commit

Permalink
#152 Do not set E-Mail to null when not permission
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacelord-XaN committed Mar 7, 2020
1 parent 54eab50 commit 1c04054
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/BraunauMobil.VeloBasar/Models/Seller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ public void UpdateNewsletterPermissions()
{
NewsletterPermissionTimesStamp = DateTime.Now;
}
else
{
EMail = null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ await RunOnInitializedDb(async () =>
Assert.NotNull(createdSeller);
Assert.NotEqual(0, createdSeller.Id);
Assert.NotNull(createdSeller.Token);
Assert.Null(createdSeller.EMail);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ await RunOnInitializedDb(async () =>
Assert.NotNull(createdSeller);
Assert.NotEqual(0, createdSeller.Id);
Assert.NotNull(createdSeller.Token);
Assert.Null(createdSeller.EMail);
Assert.Equal(timestamp, createdSeller.NewsletterPermissionTimesStamp);

await SellerContext.UpdateAsync(createdSeller);

Assert.False(createdSeller.HasNewsletterPermission);
Assert.Null(createdSeller.EMail);
Assert.Equal(timestamp, createdSeller.NewsletterPermissionTimesStamp);
});
}
Expand All @@ -55,7 +53,6 @@ await RunOnInitializedDb(async () =>
Assert.NotNull(createdSeller);
Assert.NotEqual(0, createdSeller.Id);
Assert.NotNull(createdSeller.Token);
Assert.Null(createdSeller.EMail);
Assert.Equal(timestamp, createdSeller.NewsletterPermissionTimesStamp);

createdSeller.HasNewsletterPermission = true;
Expand Down Expand Up @@ -122,7 +119,6 @@ await RunOnInitializedDb(async () =>
sellerToCreate.HasNewsletterPermission = false;
await SellerContext.UpdateAsync(createdSeller);

Assert.Null(createdSeller.EMail);
Assert.False(createdSeller.HasNewsletterPermission);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public void HasNoPermission()

Assert.False(seller.HasNewsletterPermission);
Assert.Equal(timestamp, seller.NewsletterPermissionTimesStamp);
Assert.Null(seller.EMail);
}
}
}

0 comments on commit 1c04054

Please sign in to comment.