Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke committed Jul 27, 2020
1 parent ac81e59 commit 88c30c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
10 changes: 7 additions & 3 deletions src/test/kotlin/com/baulsupp/okurl/i9n/FacebookTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ class FacebookTest {
main.run()
}

val es = listOf("service: facebook", "name: Facebook API",
"docs: https://developers.facebook.com/docs/graph-api",
"apps: https://developers.facebook.com/apps/")
val es = listOf(
"service: facebook", "name: Facebook API",
"docs: https://developers.facebook.com/docs/graph-api",
"apps: https://developers.facebook.com/apps/",
"",
"No metadata available"
)

assertEquals(es, output.stdout)
}
Expand Down
18 changes: 0 additions & 18 deletions src/test/kotlin/com/baulsupp/okurl/i9n/TwitterTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,4 @@ class TwitterTest {
assertEquals("PROFILE,CONSUMER_KEY,CONSUMER_SECRET,1234-TOKEN,SECRET",
credentialsStore.tokens[Pair("twitter", DefaultToken.name)])
}

@Test
fun importFromTwurl() {
main.authorize = "twitter"
main.arguments = mutableListOf("--twurlrc",
projectFile("src/test/resources/single_twurlrc.yaml").absolutePath)

runBlocking {
main.run()
}

if (output.failures.isNotEmpty()) {
throw output.failures[0]
}

assertEquals("PROFILE,CONSUMER_KEY,CONSUMER_SECRET,1234-TOKEN,SECRET",
credentialsStore.tokens[Pair("twitter", DefaultToken.name)])
}
}

0 comments on commit 88c30c3

Please sign in to comment.