Sha256: 199289804a678e2ad902d1f22ee5e048b23adbfbebcf64eedfab2967da5b5cb3

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

describe Gtk::FileChooserDialog do
  describe '.new' do
    it 'creates a Gtk::FileChooserDialog with the right attributes' do
      dialog = Gtk::FileChooserDialog.new 'Foo', nil, :save, [['Bar', :yes]]
      _(dialog.title).must_equal 'Foo'
      _(dialog.action).must_equal :save
      button = if Gtk::MAJOR_VERSION == 3 && Gtk::MINOR_VERSION >= 12
                 dialog.header_bar.children.to_a.last
               else
                 dialog.action_area.children.to_a.last
               end
      _(button.label).must_equal 'Bar'
      _(dialog.response_for_widget(button)).must_equal Gtk::ResponseType.to_int(:yes)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gir_ffi-gtk-0.15.0 test/gir_ffi-gtk/file_chooser_dialog_test.rb