-
Notifications
You must be signed in to change notification settings - Fork 82
Add tests for Google Drive API #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c1fc00f
519db9b
d5cc9e3
f4bb667
c444b4b
12eb3a3
a4b9585
d24157f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ HashSyntax: | |
Enabled: false | ||
LineLength: | ||
Enabled: false | ||
fail_on_violations: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
require 'test_helper' | ||
class TestGoogleDoc < Test::Unit::TestCase | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at class body beginning. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra blank line detected. |
||
# def test_authenticate_without_token | ||
# system "rm .babelish.token" | ||
# gd = Babelish::GoogleDoc.new | ||
# assert_nothing_raised do | ||
# VCR.use_cassette("auth_google_doc") do | ||
# gd.authenticate | ||
# end | ||
# end | ||
# end | ||
|
||
# {"refresh_token":"1/UHxZJZhky4MIePnAKlDWpnol-P_rVDTYxNt3h92_ilRIgOrJDtdun6zK6XiATCKT"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [90/80] |
||
|
||
# def test_authenticate_with_refresh_token | ||
# gd = Babelish::GoogleDoc.new | ||
# assert_nothing_raised do | ||
# VCR.use_cassette("refresh_token") do | ||
# gd.authenticate | ||
# end | ||
# end | ||
# end | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra blank line detected. |
||
def test_download_my_strings | ||
gd = Babelish::GoogleDoc.new | ||
# assert_nothing_raised do | ||
# VCR.use_cassette("refresh_token") do | ||
# gd.authenticate | ||
# end | ||
# end | ||
system 'echo {\"refresh_token\":\"fake_token\"} > .babelish.token' | ||
VCR.use_cassette("download_strings") do | ||
VCR.use_cassette("refresh_token") do | ||
gd.download "my_strings" | ||
end | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at method body end. |
||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at class body end. |
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.