Sha256: e5038a1f0c4f151392a10fcc6eb146e9b437eb8a3d681f9620cbceccd20e11bd
Contents?: true
Size: 628 Bytes
Versions: 7
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' describe Storytime::Navigation do describe "#handle" do it "parameterizes the title to set the handle" do nav = FactoryGirl.create(:navigation, handle: nil) expect(nav.handle).to eq nav.name.parameterize end it "parameterizes the handle" do nav = FactoryGirl.create(:navigation, handle: "my Handle") expect(nav.handle).to eq "my-handle" end it "does not change the handle if the title changes" do nav = FactoryGirl.create(:navigation, handle: "my Handle") nav.update(name: "New Name") expect(nav.handle).to eq "my-handle" end end end
Version data entries
7 entries across 7 versions & 1 rubygems