--- /dev/null
+USING: accessors stack-checker tools.test webapps.mason.report ;
+IN: webapps.mason.report.tests
+
+! <build-report-action>
+{ ( -- x ) } [
+ <build-report-action> display>> infer
+] unit-test
urls xml.syntax webapps.mason.backend webapps.mason.utils ;
IN: webapps.mason.report
+: build-report ( -- response )
+ [
+ current-builder [
+ last-report>> <html-content>
+ ] [ <404> ] if*
+ ] with-mason-db ;
+
: <build-report-action> ( -- action )
<action>
[ validate-os/cpu ] >>init
- [
- [
- current-builder [
- last-report>> <html-content>
- ] [
- <404>
- ] if
- ] with-mason-db
- ] >>display ;
+ [ build-report ] >>display ;
: report-link ( builder -- xml )
[ URL" report" ] dip