change plugins.private_flag to public_flag
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user