asciinema.org/spec/api/oembed_spec.rb

18 lines
483 B
Ruby
Raw Normal View History

2015-03-29 18:19:18 +00:00
require 'rails_helper'
describe "oEmbed provider", needs_phantomjs_2_bin: true do
2015-03-29 18:19:18 +00:00
let(:asciicast) { create(:asciicast) }
it "responds with status 200 for JSON" do
get "/oembed?url=http://localhost:3000/a/#{asciicast.id}&format=json&maxwidth=500&maxheight=300"
2015-03-29 18:19:18 +00:00
expect(response.status).to eq(200)
end
it "responds with status 200 for XML" do
get "/oembed?url=http://localhost:3000/a/#{asciicast.id}&format=xml"
expect(response.status).to eq(200)
end
end