File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 77 it { is_expected . to validate_length_of ( :text ) . is_at_most described_class ::TEXT_MAX_LENGTH }
88 it { is_expected . to validate_inclusion_of ( :active ) . in_array [ true , false ] }
99
10+ describe "#trim_name" do
11+ let ( :casa_org ) { create ( :casa_org ) }
12+
13+ context "when text is present" do
14+ it "trims leading and trailing whitespace from text" do
15+ custom_link = build ( :custom_org_link , casa_org : casa_org , text : " Example Text " )
16+ custom_link . save
17+ expect ( custom_link . text ) . to eq ( "Example Text" )
18+ end
19+ end
20+ end
21+
1022 describe "url validation - only allow http or https schemes" do
1123 it { is_expected . to allow_value ( "http://example.com" ) . for ( :url ) }
1224 it { is_expected . to allow_value ( "https://example.com" ) . for ( :url ) }
You can’t perform that action at this time.
0 commit comments