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.4.1 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.4.0.pre1 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.3.0 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.1.0 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.1 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.rc1 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre15 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre14 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre13 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre12 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre11 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre10 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre9 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre8 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre7 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre6 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre4 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre3 spec/helpers/hydra_helper_spec.rb
hydra-file-access-5.0.0.pre2 spec/helpers/hydra_helper_spec.rb