From 6fa0dfe0656b17b2a086b023f470d2a72b1480dd Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 29 Aug 2022 12:01:31 -0700 Subject: [PATCH] Improve names for a couple of properties (#377) --- src/ordinal.rs | 1 + src/subcommand/server/templates/ordinal.rs | 12 ++++++------ templates/ordinal.html | 4 ++-- tests/server.rs | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/ordinal.rs b/src/ordinal.rs index dee240036e..5e34b585d8 100644 --- a/src/ordinal.rs +++ b/src/ordinal.rs @@ -446,6 +446,7 @@ mod tests { assert!(parse("0°2015′2015″0‴").is_ok()); assert!(parse("0°2016′0″0‴").is_ok()); assert!(parse("0°2016′1″0‴").is_err()); + assert!(parse("0°0′336″0‴").is_ok()); } #[test] diff --git a/src/subcommand/server/templates/ordinal.rs b/src/subcommand/server/templates/ordinal.rs index 3847b52627..fa8223c738 100644 --- a/src/subcommand/server/templates/ordinal.rs +++ b/src/subcommand/server/templates/ordinal.rs @@ -30,13 +30,13 @@ mod tests {
decimal
0.0
degree
0°0′0″0‴
name
nvtdijuwxlp
-
height
0
+
block
0
cycle
0
epoch
0
period
0
offset
0
rarity
mythic
-
block time
1970-01-01 00:00:00
+
time
1970-01-01 00:00:00
prev next @@ -59,13 +59,13 @@ mod tests {
decimal
6929999.0
degree
5°209999′1007″0‴
name
a
-
height
6929999
+
block
6929999
cycle
5
epoch
32
period
3437
offset
0
rarity
uncommon
-
block time
1970-01-01 00:00:00
+
time
1970-01-01 00:00:00
prev next @@ -88,13 +88,13 @@ mod tests {
decimal
0.1
degree
0°0′0″1‴
name
nvtdijuwxlo
-
height
0
+
block
0
cycle
0
epoch
0
period
0
offset
1
rarity
common
-
block time
1970-01-01 00:00:00
+
time
1970-01-01 00:00:00
prev next diff --git a/templates/ordinal.html b/templates/ordinal.html index 7110232986..d0409f1fd5 100644 --- a/templates/ordinal.html +++ b/templates/ordinal.html @@ -3,13 +3,13 @@

Ordinal {{ self.ordinal.n() }}

decimal
{{ self.ordinal.decimal() }}
degree
{{ self.ordinal.degree() }}
name
{{ self.ordinal.name() }}
-
height
{{ self.ordinal.height() }}
+
block
{{ self.ordinal.height() }}
cycle
{{ self.ordinal.cycle() }}
epoch
{{ self.ordinal.epoch() }}
period
{{ self.ordinal.period() }}
offset
{{ self.ordinal.third() }}
rarity
{{ self.ordinal.rarity() }}
-
block time
{{ self.blocktime }}
+
time
{{ self.blocktime }}
%% if self.ordinal.n() > 0 { prev diff --git a/tests/server.rs b/tests/server.rs index 6283f2dc9f..562c0f8f45 100644 --- a/tests/server.rs +++ b/tests/server.rs @@ -293,7 +293,7 @@ fn unmined_ordinal() { state.request_regex( "ordinal/0", 200, - ".*
block time
2011-02-02 23:16:42
.*", + ".*
time
2011-02-02 23:16:42
.*", ); } @@ -303,7 +303,7 @@ fn mined_ordinal() { state.request_regex( "ordinal/5000000000", 200, - ".*
block time
.* \\(expected\\)
.*", + ".*
time
.* \\(expected\\)
.*", ); }