public void AttachmentExtenderDoesNotConfuseSlashes() { var aVM = new AttachmentVM(new Attachment { Path = "/h.txt" }) { DropZone = "files" }; aVM.Path.Should().Be("/files/h.txt"); }
public void BiggerAttachmentsAreShownInMegs() { var aVM = new AttachmentVM(new Attachment { Size = 2 * 1024 * 1024 + 50000 }); aVM.Size.Should().Be("2.05"); aVM.SizeDimension.Should().Be("MB"); }
public void AttachmentExtenderAddsDropZonePrefix() { var aVM = new AttachmentVM(new Attachment { Path = "h.txt" }) { DropZone = "/files"}; aVM.Path.Should().Be("/files/h.txt"); }
public void AttachmentVMShowsSizeInKilobytes() { var aVM = new AttachmentVM(new Attachment { Size = 2048 + 512 }); aVM.Size.Should().Be("2.5"); aVM.SizeDimension.Should().Be("KB"); }