Tapir provides a framework for building Anonymous / metadata resistant Services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
574 B

  1. package applications
  2. import "testing"
  3. func TestTranscriptApp(t *testing.T) {
  4. ta := new(TranscriptApp)
  5. ta.Init(MockConnection{})
  6. ta.Transcript().NewProtocol("test")
  7. ta.transcript.CommitToTranscript("test-commit")
  8. t.Logf(ta.Transcript().OutputTranscriptToAudit())
  9. // Now we test panic'ing....
  10. defer func() {
  11. if r := recover(); r == nil {
  12. t.Errorf("The code did not panic - it definitely should have")
  13. }
  14. }()
  15. // Attempt to reinitialized the transcript, apps should *never* do this and we want to be hostile to that
  16. // behaviour
  17. ta.Init(MockConnection{})
  18. }