Skip to content

Commit d9c1010

Browse files
committed
refactor: use indoc in awlward unit tests
1 parent 1185045 commit d9c1010

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

rust/operator-binary/src/crd/security.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ pub struct AuthorizationConfig {
3838

3939
#[cfg(test)]
4040
mod tests {
41+
use indoc::indoc;
42+
4143
use super::*;
4244

4345
#[test]
@@ -49,9 +51,13 @@ mod tests {
4951

5052
#[test]
5153
fn authorization_with_opa_is_parsed() {
52-
let yaml = ["opa:", " configMapName: my-opa", " package: hbase"].join("\n");
54+
let yaml = indoc! {"
55+
opa:
56+
configMapName: my-opa
57+
package: hbase
58+
"};
5359
let config: AuthorizationConfig =
54-
serde_yaml::from_str(&yaml).expect("authorization with opa");
60+
serde_yaml::from_str(yaml).expect("authorization with opa");
5561
assert!(config.opa.is_some());
5662
}
5763
}

0 commit comments

Comments
 (0)