spec/adyen-admin/skin_spec.rb in adyen-admin-0.0.11 vs spec/adyen-admin/skin_spec.rb in adyen-admin-0.0.12
- old
+ new
@@ -3,14 +3,20 @@
require "adyen-admin/client"
require "adyen-admin/skin"
module Adyen::Admin
describe Skin, :vcr do
- let(:skin_fixtures) { 'spec/fixtures/skins' }
+ let(:skin_fixtures) { File.expand_path 'spec/fixtures/skins' }
let(:skin_code) { "7hFAQnmt" }
let(:skin) { Skin.new(:code => skin_code, :name => "example") }
+ describe ".all" do
+ it 'returns all local skins' do
+ Skin.all.should == Skin.all_local
+ end
+ end
+
context "authenticated" do
before(:all) do
VCR.use_cassette("login") do
Adyen::Admin.client.cookie_jar.clear!
Adyen::Admin.login("SoundCloud", "skinadmin", "12312311")
@@ -36,35 +42,34 @@
end
end
describe ".all_local" do
it 'returns the skins' do
- Skin.all_local(skin_fixtures).should == [
+ Skin.all_local.should == [
Skin.new(:code => "base"),
Skin.new(:code => "DV3tf95f"),
skin,
Skin.new(:code => "JH0815"),
]
end
end
describe ".all" do
it 'returns the skins' do
- Skin.all(skin_fixtures).should == [
+ Skin.all.should == [
skin,
Skin.new(:code => "Kx9axnRf", :name => "demo"),
Skin.new(:code => "vQW0fEo8", :name => "test"),
Skin.new(:code => "base"),
Skin.new(:code => "DV3tf95f"),
Skin.new(:code => "JH0815")
]
end
it 'freezes local skins' do
- Skin.all(skin_fixtures).last.should be_frozen
+ Skin.all.last.should be_frozen
end
end
-
describe ".find" do
it 'returns the skin' do
Skin.find(skin_code).should == skin
end