Sha256: e9cf518b5fe2ea1515a02491c439a65af7b57f6d875baaf5de2e14d45f67ca26
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
# -*- coding: utf-8 -*- require 'test_helper' class OembedProviderControllerTest < ActionController::TestCase context "The oembed provider controller" do setup do @photo = Factory.create(:photo) end should "endpoint" do get :endpoint, :url => "http://example.com/photos/#{@photo.id}" assert_response :success end should "endpoint with format json" do @request.accept = "text/javascript" get :endpoint, :url => "http://example.com/photos/#{@photo.id}", :format => 'json' assert_response :success end should "endpoint with format json and callback, return json-p" do @request.accept = "text/javascript" get :endpoint, :url => "http://example.com/photos/#{@photo.id}", :format => 'json', :callback => 'myCallback' assert_response :success end should "endpoint with format xml" do @request.accept = "text/xml" get :endpoint, :url => "http://example.com/photos/#{@photo.id}", :format => 'xml' assert_response :success end end end
Version data entries
2 entries across 2 versions & 1 rubygems