Sha256: 2cfeb4177bac68af0ff10d5eceb698112d67a4f5be50611818892f062aa5d4ab

Contents?: true

Size: 665 Bytes

Versions: 14

Compression:

Stored size: 665 Bytes

Contents

require 'spec_helper'

describe FbGraph2::Util do
  describe '.as_identifier' do
    context 'when FbGraph2::Node given' do
      it do
        FbGraph2::Util.as_identifier(
          FbGraph2::Node.new 'object_id'
        ).should == 'object_id'
      end
    end

    context 'when String given' do
      it do
        FbGraph2::Util.as_identifier('object_id').should == 'object_id'
      end
    end

    context 'when FbGraph2::Struct::Permission given' do
      it do
        FbGraph2::Util.as_identifier(
          FbGraph2::Struct::Permission.new(permission: 'permission_name', granted: true)
        ).should == 'permission_name'
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fb_graph2-1.3.0 spec/fb_graph2/util_spec.rb
fb_graph2-1.2.0 spec/fb_graph2/util_spec.rb
fb_graph2-1.1.1 spec/fb_graph2/util_spec.rb
fb_graph2-1.1.0 spec/fb_graph2/util_spec.rb
fb_graph2-1.0.1 spec/fb_graph2/util_spec.rb
fb_graph2-1.0.0 spec/fb_graph2/util_spec.rb
fb_graph2-0.9.1 spec/fb_graph2/util_spec.rb
fb_graph2-0.9.0 spec/fb_graph2/util_spec.rb
fb_graph2-0.8.0 spec/fb_graph2/util_spec.rb
fb_graph2-0.7.9 spec/fb_graph2/util_spec.rb
fb_graph2-0.7.8 spec/fb_graph2/util_spec.rb
fb_graph2-0.7.7 spec/fb_graph2/util_spec.rb
fb_graph2-0.7.6 spec/fb_graph2/util_spec.rb
fb_graph2-0.7.5 spec/fb_graph2/util_spec.rb