summaryrefslogtreecommitdiff
path: root/spec/views/v1/licenses/show.json.jbuilder_spec.rb
blob: e4b337cc095e9804667d203265ccc54c297e0d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require "spec_helper"

describe 'v1/licenses/show' do
  let!(:license) { License.create(issued_at: 2.days.ago, expired_at: 1.day.from_now) }

  before :each do
    assign(:license, license)
    render
  end

  let(:result) { JSON.parse(rendered) }

  it "includes the license date range" do
    result["issued_at"].should == license.issued_at.to_s
    result["expired_at"].should == license.expired_at.to_s
  end
end