change plugins.private_flag to public_flag

This commit is contained in:
Lee Lawlor
2014-10-16 10:43:21 -04:00
parent 75ac3db89a
commit e9ad17f5f4
11 changed files with 57 additions and 50 deletions

View File

@ -2,15 +2,15 @@
#
# Table name: plugins
#
# id :integer not null, primary key
# name :string(255)
# user_id :integer
# html :text
# css :text
# js :text
# created_at :datetime
# updated_at :datetime
# private_flag :boolean default(TRUE)
# id :integer not null, primary key
# name :string(255)
# user_id :integer
# html :text
# css :text
# js :text
# created_at :datetime
# updated_at :datetime
# public_flag :boolean default(FALSE)
#
require 'spec_helper'
@ -42,7 +42,7 @@ describe Plugin do
it "new, public plugin should get 2 plugin windows" do
plugin = Plugin.new
plugin.private_flag = false
plugin.public_flag = true
plugin.public?.should be_true
#Private plugins have one window..
#Public plugins have a private window and a public window
@ -54,7 +54,7 @@ describe Plugin do
it "new, private window should not be showing" do
plugin = Plugin.new
plugin.private_flag = true
plugin.public_flag = false
plugin.public?.should be_false
#Private plugins have one window..
@ -67,19 +67,19 @@ describe Plugin do
it "should destroy public windows when changing plugin from public to private" do
plugin = Plugin.new
plugin.private_flag = true
plugin.public_flag = false
plugin.public?.should be_false
#Private plugins have one window..
plugin.make_windows @channel.id, "localhost"
plugin.windows.size.should eq(1)
plugin.private_flag = false
plugin.public_flag = true
plugin.save
plugin.make_windows @channel.id, "localhost"
plugin.windows.size.should eq(2)
plugin.private_flag = true
plugin.public_flag = false
plugin.save
plugin.make_windows @channel.id, "localhost"
plugin.windows.size.should eq(1)
@ -87,7 +87,7 @@ describe Plugin do
it "should allow only private_windows to be retrieved" do
plugin = Plugin.new
plugin.private_flag = false
plugin.public_flag = true
plugin.public?.should be_true
#Private window has private_dashboard_visibility only
plugin.make_windows @channel.id, "localhost"
@ -97,7 +97,7 @@ describe Plugin do
it "should allow only public_windows to be retrieved" do
plugin = Plugin.new
plugin.private_flag = false
plugin.public_flag = true
plugin.public?.should be_true
#Private window has private_dashboard_visibility only
plugin.make_windows @channel.id, "localhost"