From 48b9619439818ecb344ae33c9c31a55ecb1aa27a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 5 Nov 2016 15:20:05 +0100 Subject: Adding hashtags --- spec/controllers/api/v1/statuses_controller_spec.rb | 11 +++++++++++ spec/controllers/tags_controller_spec.rb | 12 ++++++++++++ spec/helpers/tags_helper_spec.rb | 5 +++++ 3 files changed, 28 insertions(+) create mode 100644 spec/controllers/tags_controller_spec.rb create mode 100644 spec/helpers/tags_helper_spec.rb (limited to 'spec') diff --git a/spec/controllers/api/v1/statuses_controller_spec.rb b/spec/controllers/api/v1/statuses_controller_spec.rb index cf0b3649f..9f9bb0c4f 100644 --- a/spec/controllers/api/v1/statuses_controller_spec.rb +++ b/spec/controllers/api/v1/statuses_controller_spec.rb @@ -80,6 +80,17 @@ RSpec.describe Api::V1::StatusesController, type: :controller do end end + describe 'GET #tag' do + before do + post :create, params: { status: 'It is a #test' } + end + + it 'returns http success' do + get :tag, params: { id: 'test' } + expect(response).to have_http_status(:success) + end + end + describe 'POST #create' do before do post :create, params: { status: 'Hello world' } diff --git a/spec/controllers/tags_controller_spec.rb b/spec/controllers/tags_controller_spec.rb new file mode 100644 index 000000000..f433cf271 --- /dev/null +++ b/spec/controllers/tags_controller_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' + +RSpec.describe TagsController, type: :controller do + + describe 'GET #show' do + it 'returns http success' do + get :show, params: { id: 'test' } + expect(response).to have_http_status(:success) + end + end + +end diff --git a/spec/helpers/tags_helper_spec.rb b/spec/helpers/tags_helper_spec.rb new file mode 100644 index 000000000..f661e44ac --- /dev/null +++ b/spec/helpers/tags_helper_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe TagsHelper, type: :helper do + +end -- cgit