don't list public plugins
This commit is contained in:
parent
1b44dfbd4b
commit
06824f1957
@ -1,3 +1,4 @@
|
||||
<!--
|
||||
<div>
|
||||
<%= render 'response' %>
|
||||
<h2 id="index">List Public Plugins</h2>
|
||||
@ -92,10 +93,10 @@ Example GET:
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
-->
|
||||
<div>
|
||||
<%= render 'response' %>
|
||||
<h2>List My Plugins</h2>
|
||||
<h2 id="index">List My Plugins</h2>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
@ -127,7 +127,7 @@ Thingspeak::Application.routes.draw do
|
||||
collection do
|
||||
get 'private_plugins'
|
||||
get 'public_plugins'
|
||||
get 'public'
|
||||
#get 'public'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -20,23 +20,23 @@ describe PluginsController do
|
||||
end
|
||||
|
||||
describe "Not Logged In" do
|
||||
it "should display public plugins" do
|
||||
get :public
|
||||
response.should render_template('public')
|
||||
end
|
||||
#it "should display public plugins" do
|
||||
# get :public
|
||||
# response.should render_template('public')
|
||||
#end
|
||||
|
||||
it "should show paginated list of public plugins as json" do
|
||||
@plugin.update_column(:public_flag, true)
|
||||
get :public, :format => :json
|
||||
JSON.parse(response.body).keys.include?('pagination').should be_true
|
||||
JSON.parse(response.body)['plugins'].length.should eq(1)
|
||||
end
|
||||
#it "should show paginated list of public plugins as json" do
|
||||
# @plugin.update_column(:public_flag, true)
|
||||
# get :public, :format => :json
|
||||
# JSON.parse(response.body).keys.include?('pagination').should be_true
|
||||
# JSON.parse(response.body)['plugins'].length.should eq(1)
|
||||
#end
|
||||
|
||||
it "should not show private plugins" do
|
||||
@plugin.update_column(:public_flag, false)
|
||||
get :public, :format => :json
|
||||
JSON.parse(response.body)['plugins'].length.should eq(0)
|
||||
end
|
||||
#it "should not show private plugins" do
|
||||
# @plugin.update_column(:public_flag, false)
|
||||
# get :public, :format => :json
|
||||
# JSON.parse(response.body)['plugins'].length.should eq(0)
|
||||
#end
|
||||
end
|
||||
|
||||
describe "API" do
|
||||
|
Loading…
Reference in New Issue
Block a user