aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jake Swenson <jake@jakeswenson.com> 2021-05-15 21:45:38 -0700
committerGravatar Jake Swenson <jake@jakeswenson.com> 2021-05-15 21:45:38 -0700
commitb32e87c70d0875458a79bd99130c21d3f9b29a07 (patch)
treecb0e49b751267a3553d5c9d2f5849c083cd8cbc9 /src
parent921215f4ef57cbaba4a11fe24213a5c50f9f88e0 (diff)
downloadnotion-b32e87c70d0875458a79bd99130c21d3f9b29a07.tar.gz
notion-b32e87c70d0875458a79bd99130c21d3f9b29a07.tar.zst
notion-b32e87c70d0875458a79bd99130c21d3f9b29a07.zip
fix: Test include_str in CI
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8aeeb62..0dd8366 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -114,8 +114,10 @@ mod tests {
let token = {
if let Some(token) = std::env::var("NOTION_API_TOKEN").ok() {
token
+ } else if let Some(token) = std::fs::read_to_string(".api_token").ok() {
+ token
} else {
- include_str!(".api_token").to_string()
+ panic!("No API Token found in environment variable 'NOTION_API_TOKEN'!")
}
};
token.trim().to_string()