Sha256: 54b90fa3a436aa121d9bf92f684dc227b3ae6187b44574a9b6d175c0f2deb2c3
Contents?: true
Size: 1.71 KB
Versions: 8
Compression:
Stored size: 1.71 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') require 'rack/test' describe 'SkinBuilder server' do include Rack::Test::Methods def app Adyen::SkinBuilder::Server.app( :skins_directory => File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/skins/DV3tf95f')) ) end describe 'get asset from skin directory' do before(:each) do get '/sf/DV3tf95f/css/screen.css' end it 'responds with 200 status' do last_response.status.should == 200 end it 'responds with "text/css" content type header for CSS file' do last_response.headers.fetch('Content-Type').should == 'text/css' end end describe 'get asset from skins base directory' do before(:each) do get '/sf/DV3tf95f/css/print.css' end it 'responds with 200 status' do last_response.status.should == 200 end it 'responds with "text/css" content type header for CSS file' do last_response.headers.fetch('Content-Type').should == 'text/css' end end describe 'GET /' do before(:each) do get '/' end it 'responds with 200 status' do last_response.status.should == 200 end it 'returns adyen skeleton in HTML format' do last_response.headers.fetch('Content-Type').should == 'text/html' end end describe 'HEAD /' do before(:each) do head '/' end it 'responds withr 200 status' do last_response.status.should == 200 end it 'returns content type header' do last_response.headers.should == { 'Content-Type' => 'text/html' } end it 'returns empty body' do last_response.body.should == '' end end end
Version data entries
8 entries across 8 versions & 1 rubygems