confetti 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/confetti/config.rb +4 -0
- data/lib/confetti/version.rb +1 -1
- data/spec/config_spec.rb +21 -0
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/confetti/config.rb
CHANGED
data/lib/confetti/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
@@ -508,4 +508,25 @@ describe Confetti::Config do
|
|
508
508
|
@config.preference(:privacy).should be_nil
|
509
509
|
end
|
510
510
|
end
|
511
|
+
|
512
|
+
describe "full_access?" do
|
513
|
+
before do
|
514
|
+
@config = Confetti::Config.new
|
515
|
+
end
|
516
|
+
|
517
|
+
it "should be false with an empty access set" do
|
518
|
+
@config.full_access?.should be_false
|
519
|
+
end
|
520
|
+
|
521
|
+
it "should be true when origin='*' is in there" do
|
522
|
+
@config.access_set << Confetti::Config::Access.new('*')
|
523
|
+
@config.full_access?.should be_true
|
524
|
+
end
|
525
|
+
|
526
|
+
it "should be false with only other origins" do
|
527
|
+
@config.access_set << Confetti::Config::Access.new('http://mysite.com')
|
528
|
+
@config.access_set << Confetti::Config::Access.new('http://myothersite.com')
|
529
|
+
@config.full_access?.should be_false
|
530
|
+
end
|
531
|
+
end
|
511
532
|
end
|