From f2c16bec85da5a43f79d70cff8bf80f345adbf4f Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg <maxwell@joindiaspora.com> Date: Sat, 15 Oct 2011 22:38:21 -0700 Subject: [PATCH] add files --- app/controllers/api/v0/tags_controller.rb | 5 +++++ .../api/v0/tags_controller_spec.rb | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 app/controllers/api/v0/tags_controller.rb create mode 100644 spec/controllers/api/v0/tags_controller_spec.rb diff --git a/app/controllers/api/v0/tags_controller.rb b/app/controllers/api/v0/tags_controller.rb new file mode 100644 index 0000000000..15a6bed514 --- /dev/null +++ b/app/controllers/api/v0/tags_controller.rb @@ -0,0 +1,5 @@ +class Api::V0::TagsController < ApplicationController + def show + + end +end diff --git a/spec/controllers/api/v0/tags_controller_spec.rb b/spec/controllers/api/v0/tags_controller_spec.rb new file mode 100644 index 0000000000..1fd9867a4f --- /dev/null +++ b/spec/controllers/api/v0/tags_controller_spec.rb @@ -0,0 +1,20 @@ +# Copyright (c) 2010-2011, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + +require 'spec_helper' + +describe Api::V0::TagsController do + describe '#show' do + it 'succeeds' do + get :show, :name => 'alice' + response.should be_success + end + + it "returns the basic tag data" do + get :show, :name => 'alice' + parsed_json = JSON.parse(response.body) + parsed_json.keys.should =~ %w(name person_count followed_count posts) + end + end +end -- GitLab