test/exercism/api_test.rb in exercism-0.0.27 vs test/exercism/api_test.rb in exercism-0.0.28
- old
+ new
@@ -73,10 +73,20 @@
assert_equal 201, response.status
end
end
end
+ def test_get_current_assignments
+ Exercism.stub(:home, home) do
+ VCR.use_cassette('alice-gets-current-assignments') do
+ response = Exercism::Api.new('http://localhost:4567', Exercism.user).current
+ body = JSON.parse(response.body)
+ assert_equal 200, response.status
+ end
+ end
+ end
+
def test_save_stash_to_api
submission = File.join(FileUtils.pwd, 'bob.rb')
File.open(submission, 'w') do |f|
f.write "puts 'hello world'"
end
@@ -114,8 +124,6 @@
response = Exercism::Api.new('http://localhost:4567', Exercism.user).list_stash('user/assignments/stash/list')
assert response
end
end
end
-
-
end