From bf745bf731237f4d405065de5d386eaee2a2d131 Mon Sep 17 00:00:00 2001 From: Zog Date: Fri, 30 Mar 2018 16:15:48 +0200 Subject: Refs #6367; Add metadata to other versioned models --- spec/controllers/routes_controller_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'spec/controllers') diff --git a/spec/controllers/routes_controller_spec.rb b/spec/controllers/routes_controller_spec.rb index a001a942d..b7cb66b46 100644 --- a/spec/controllers/routes_controller_spec.rb +++ b/spec/controllers/routes_controller_spec.rb @@ -42,11 +42,14 @@ RSpec.describe RoutesController, type: :controller do before(:each) do post :create, line_id: route.line_id, referential_id: referential.id, - route: { name: "changed"} + route: { name: "changed", published_name: "published_name"} end it_behaves_like "line and referential linked" it_behaves_like "redirected to referential_line_path(referential,line)" + it "sets metadata" do + expect(Chouette::Route.last.metadata.creator_username).to eq @user.username + end end describe "PUT /update" do @@ -58,6 +61,9 @@ RSpec.describe RoutesController, type: :controller do it_behaves_like "route, line and referential linked" it_behaves_like "redirected to referential_line_path(referential,line)" + it "sets metadata" do + expect(Chouette::Route.last.metadata.modifier_username).to eq @user.username + end end describe "GET /show" do -- cgit v1.2.3