diff --git a/app/controllers/api/v0/tags_controller.rb b/app/controllers/api/v0/tags_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..15a6bed514d1ec2eef9d27d88749bdcdd6421222 --- /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 0000000000000000000000000000000000000000..1fd9867a4fbdd9e9136b7fea527410a23fa51c10 --- /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