diff options
| author | Zog | 2018-03-30 16:15:48 +0200 | 
|---|---|---|
| committer | Zog | 2018-04-09 16:58:23 +0200 | 
| commit | bf745bf731237f4d405065de5d386eaee2a2d131 (patch) | |
| tree | 584b5d6748deb095e399117c1f443bd7febed8d1 /spec/controllers/routes_controller_spec.rb | |
| parent | 745428deb8e0df2c7c8a991ab8a5f5231e6d6c7f (diff) | |
| download | chouette-core-bf745bf731237f4d405065de5d386eaee2a2d131.tar.bz2 | |
Refs #6367; Add metadata to other versioned models
Diffstat (limited to 'spec/controllers/routes_controller_spec.rb')
| -rw-r--r-- | spec/controllers/routes_controller_spec.rb | 8 | 
1 files changed, 7 insertions, 1 deletions
| 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 | 
