This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"tasks":[{"course_code":"API101","emitter":"bCourses","linkDescription":"View in bCourses","linkUrl":"https://ucberkeley.instructure.com/courses/767330/assignments/2588302","sourceUrl":"https://ucberkeley.instructure.com/courses/767330/assignments/2588302","status":"inprogress","title":"Past Discussion","type":"assignment","dueDate":{"epoch":1427871540,"dateTime":"2015-03-31T23:59:00-07:00","dateString":"3/31","hasTime":true},"bucket":"Overdue"},{"course_code":"API101","emitter":"bCourses","linkDescription":"View in bCourses","linkUrl":"https://ucberkeley.instructure.com/courses/767330/assignments/2588242","sourceUrl":"https://ucberkeley.instructure.com/courses/767330/assignments/2588242","status":"inprogress","title":"Online-Submission Past Assignment","type":"assignment","dueDate":{"epoch":1427958300,"dateTime":"2015-04-02T00:05:00-07:00","dateString":"4/02","hasTime":true},"bucket":"Overdue"},{"course_code":"API101","emitter":"bCourses","linkDescription":"View in bCourses","linkUrl":"https://ucberkeley.i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mock_request | |
# Webmock match criteria need an adjustment because of basic authentication. | |
feed_uri = URI.parse(@settings.base_url) | |
{ | |
method: :any, | |
uri: /.*#{feed_uri.hostname}#{feed_uri.path}.*/ | |
} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4) Bearfacts::Telebears it should behave like a student data proxy server error returns an error status | |
Failure/Error: expect(lines[0]).to match(/url: http/) | |
expected "SLOW PROXY duration: 13ms {:url=>\"https://apis-dev.berkeley.edu/bearfacts-apis/student/11667051/reg/appointments\", :class=>Bearfacts::Telebears, :exception=>[\"Errors::ProxyError\", \"Errors::ProxyError\"]} " to match /url: http/ | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-/url: http/ | |
+"SLOW PROXY duration: 13ms {:url=>\"https://apis-dev.berkeley.edu/bearfacts-apis/student/11667051/reg/appointments\", :class=>Bearfacts::Telebears, :exception=>[\"Errors::ProxyError\", \"Errors::ProxyError\"]} " | |
Shared Example Group: "a student data proxy" called from ./spec/models/bearfacts/telebears_spec.rb:6 | |
# ./spec/support/proxy_shared_examples.rb:8:in `(root)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'google/api_client' | |
require 'google/api_client/client_secrets' | |
require 'google/api_client/auth/file_storage' | |
require 'sinatra' | |
require 'logger' | |
enable :sessions | |
CREDENTIAL_STORE_FILE = "#{$0}-oauth2.json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class DateTimeBugTest < ActiveSupport::TestCase | |
test "a PDT parsed DateTime should convert to_i and back again" do | |
original_date=DateTime.parse('2014-04-05T23:59:59-07:00') | |
assert original_date == DateTime.strptime(original_date.to_i.to_s, '%s') | |
end | |
test "a GMT parsed DateTime should convert to_i and back again" do |