Skip to content

Commit 63df9f6

Browse files
committed
sanity check the preview response output #2155
1 parent 88e3bec commit 63df9f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/functional/observation_units_controller_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,10 @@ def rdf_test_object
208208
test 'preview observation unit' do
209209
person = FactoryBot.create(:person)
210210
login_as(person)
211-
obs_unit = FactoryBot.create(:observation_unit, policy: FactoryBot.create(:public_policy), contributor:person)
211+
obs_unit = FactoryBot.create(:observation_unit, title: 'preview obs unit', policy: FactoryBot.create(:public_policy), contributor:person)
212212
get :preview, xhr: true, params: { id: obs_unit.id }
213213
assert_response :success
214+
assert_includes response.body, "<a href=\\\"/observation_units/#{obs_unit.id}\\\">preview obs unit<\\/a>"
214215
end
215216

216217
end

0 commit comments

Comments
 (0)