Sha256: 7f82e813c59e5bdfc37607bfcfe23a2b8055e78c05f3e60a30a4a865c3bd8508

Contents?: true

Size: 596 Bytes

Versions: 21

Compression:

Stored size: 596 Bytes

Contents

require 'spec_helper'


describe HydraHelper do
  
  describe "submit_name" do
    it "should return 'Save' when the scripts session variable is set" do
      helper.stub(:session => {:scripts=>true})
      helper.submit_name.should == "Save"
    end
    it "should return 'Continue' when the new_asset param is set" do
      helper.stub(:params => {:new_asset=>true})
      helper.submit_name.should == "Continue"
    end
    it "should return 'Save and Continue' if all else fails" do
      helper.stub(:params => {})
      helper.submit_name.should == "Save and Continue"
    end
  end
  
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hydra-file-access-5.0.0.pre1 spec/helpers/hydra_helper_spec.rb