Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

RSpec test for Radiustar::Value#id

  • Loading branch information...
commit 39d20451ad6c633efebb14c1543036a7120a7689 1 parent 90b1f60
Guido De Rosa authored November 26, 2010

Showing 1 changed file with 11 additions and 0 deletions. Show diff stats Hide diff stats

  1. 11  spec/value_spec.rb
11  spec/value_spec.rb
... ...
@@ -0,0 +1,11 @@
  1
+require File.join(File.dirname(__FILE__), %w[spec_helper])
  2
+
  3
+describe Radiustar::Value do    
  4
+  it "should get numeric value of NAS-Port-Type == Ethernet from dictionary.rfc2865" do
  5
+    dict = Radiustar::Dictionary.new
  6
+    dict.read(File.dirname(__FILE__) + '/../templates/dictionary.rfc2865')
  7
+    attribute = dict.find_attribute_by_name 'NAS-Port-Type'
  8
+    ethernet_value = attribute.find_values_by_name 'Ethernet'
  9
+    ethernet_value.id.should == 15
  10
+  end
  11
+end

0 notes on commit 39d2045

Please sign in to comment.
Something went wrong with that request. Please try again.