diff options
Diffstat (limited to 'spec/controllers/api')
| -rw-r--r-- | spec/controllers/api/v1/tutorials_controller_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/tutorials_controller_spec.rb b/spec/controllers/api/v1/tutorials_controller_spec.rb index e4845072..435e6136 100644 --- a/spec/controllers/api/v1/tutorials_controller_spec.rb +++ b/spec/controllers/api/v1/tutorials_controller_spec.rb @@ -26,6 +26,7 @@ describe Api::V1::TutorialsController do image_url: "https://abs.twimg.com/a/1405611403/img/t1/front_page/exp_wc2014_gen_laurenlemon.jpg", heading: "Twitter", description: "Connect with your friends - and other fascinating people. Get in-the-moment updates on the things that interest you. And watch events unfold, in real time, from every angle.", + tags: "cake,cookie", } post :create, tutorial: attributes, format: :json @@ -33,6 +34,9 @@ describe Api::V1::TutorialsController do expect(assigns(:tutorial).url).to eql(attributes[:url]) expect(assigns(:tutorial).description).to eql(attributes[:description]) expect(assigns(:tutorial).heading).to eql(attributes[:heading]) + expect(assigns(:tutorial).tags.count).to eql(2) + expect(assigns(:tutorial).tags.first.name).to eql('cake') + expect(assigns(:tutorial).tags.last.name).to eql('cookie') end end end |
