forked from fractal-bitcoin/ord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
traits.rs
38 lines (37 loc) Β· 903 Bytes
/
traits.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use {super::*, ord::subcommand::traits::Output, ordinals::Rarity};
#[test]
fn traits_command_prints_sat_traits() {
assert_eq!(
CommandBuilder::new("traits 0").run_and_deserialize_output::<Output>(),
Output {
number: 0,
decimal: "0.0".into(),
degree: "0Β°0β²0β³0β΄".into(),
name: "nvtdijuwxlp".into(),
height: 0,
cycle: 0,
epoch: 0,
period: 0,
offset: 0,
rarity: Rarity::Mythic,
}
);
}
#[test]
fn traits_command_for_last_sat() {
assert_eq!(
CommandBuilder::new("traits 2099999997689999").run_and_deserialize_output::<Output>(),
Output {
number: 2099999997689999,
decimal: "6929999.0".into(),
degree: "5Β°209999β²1007β³0β΄".into(),
name: "a".into(),
height: 6929999,
cycle: 5,
epoch: 32,
period: 3437,
offset: 0,
rarity: Rarity::Uncommon,
}
);
}