Sha256: 84908138fa3bc3b5552e2d8dfabe24150c46523dd4b9401fd2417af89c30f664

Contents?: true

Size: 499 Bytes

Versions: 5

Compression:

Stored size: 499 Bytes

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/watirspec/spec_helper'

describe "FileField" do

  before :each do
    browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
  end

  describe "#set" do
    it "sends content as correct content type for common file types" do
      browser.file_field(:name, "new_user_portrait").set("foo.doc")
      obj = browser.file_field(:name, "new_user_portrait").locate
      obj.getContentType.should == "application/msword"
    end
  end

end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
drnic-celerity-0.0.6.17 spec/filefield_spec.rb
jarib-celerity-0.0.6.19 spec/filefield_spec.rb
jarib-celerity-0.0.7.1 spec/filefield_spec.rb
celerity-0.0.7.2 spec/filefield_spec.rb
celerity-0.0.7 spec/filefield_spec.rb