Fix random title with trailing spaces

When the generated title for a dashboard action ended with a space, the
action `click_link(feature.title)` failed because the link shown in the
HTML ignores the trailing spaces.

Using `strip` solves the problem. Not the most elegant solution, though;
ideally we'd generate a better title.
This commit is contained in:
Javi Martín
2019-11-08 17:47:48 +01:00
parent 487008d445
commit 8f021cbfce

View File

@@ -132,7 +132,7 @@ FactoryBot.define do
end
factory :dashboard_action, class: "Dashboard::Action" do
title { Faker::Lorem.sentence[0..79] }
title { Faker::Lorem.sentence[0..79].strip }
description { Faker::Lorem.sentence }
link { nil }
request_to_administrators { true }